Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
0442b3ea
Commit
0442b3ea
authored
Apr 13, 2012
by
Alexander Reshetnikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated diagnostic messages in VideoWriter (for ticket #1736)
parent
b07f89dc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
+18
-5
cap_ffmpeg_impl.hpp
modules/highgui/src/cap_ffmpeg_impl.hpp
+9
-3
cap_ffmpeg_impl_v2.hpp
modules/highgui/src/cap_ffmpeg_impl_v2.hpp
+9
-2
No files found.
modules/highgui/src/cap_ffmpeg_impl.hpp
View file @
0442b3ea
...
...
@@ -1309,15 +1309,21 @@ void CvVideoWriter_FFMPEG::close()
/* find the video encoder */
codec
=
avcodec_find_encoder
(
c
->
codec_id
);
if
(
!
codec
)
{
fprintf
(
stderr
,
"Could not find encoder for codec id %d: %s"
,
c
->
codec_id
,
icvFFMPEGErrStr
(
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0)
AVERROR_ENCODER_NOT_FOUND
#else
-
1
#endif
));
return
false
;
}
c
->
bit_rate_tolerance
=
c
->
bit_rate
;
/* open the codec */
if
(
(
err
=
avcodec_open
(
c
,
codec
))
<
0
)
{
char
errtext
[
256
];
sprintf
(
errtext
,
"Could not open codec '%s': %s"
,
codec
->
name
,
icvFFMPEGErrStr
(
err
));
if
(
(
err
=
avcodec_open
(
c
,
codec
))
<
0
)
{
fprintf
(
stderr
,
"Could not open codec '%s': %s"
,
codec
->
name
,
icvFFMPEGErrStr
(
err
));
return
false
;
}
...
...
modules/highgui/src/cap_ffmpeg_impl_v2.hpp
View file @
0442b3ea
...
...
@@ -43,6 +43,7 @@
#include "cap_ffmpeg_api.hpp"
#include <assert.h>
#include <algorithm>
#include <stdio.h>
#if defined _MSC_VER && _MSC_VER >= 1200
#pragma warning( disable: 4244 4510 4512 4610 )
...
...
@@ -1454,6 +1455,13 @@ void CvVideoWriter_FFMPEG::close()
/* find the video encoder */
codec
=
avcodec_find_encoder
(
c
->
codec_id
);
if
(
!
codec
)
{
fprintf
(
stderr
,
"Could not find encoder for codec id %d: %s"
,
c
->
codec_id
,
icvFFMPEGErrStr
(
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0)
AVERROR_ENCODER_NOT_FOUND
#else
-
1
#endif
));
return
false
;
}
...
...
@@ -1470,8 +1478,7 @@ void CvVideoWriter_FFMPEG::close()
avcodec_open
(
c
,
codec
)
#endif
)
<
0
)
{
char
errtext
[
256
];
sprintf
(
errtext
,
"Could not open codec '%s': %s"
,
codec
->
name
,
icvFFMPEGErrStr
(
err
));
fprintf
(
stderr
,
"Could not open codec '%s': %s"
,
codec
->
name
,
icvFFMPEGErrStr
(
err
));
return
false
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment