Commit aff34adf authored by Alexander Reshetnikov's avatar Alexander Reshetnikov

Updated new ffmpeg wrapper

parent dc6cad3d
...@@ -961,7 +961,7 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc, ...@@ -961,7 +961,7 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc,
AVCodec *codec; AVCodec *codec;
st = av_new_stream(oc, 0); st = avformat_new_stream(oc, 0);
if (!st) { if (!st) {
CV_WARN("Could not allocate stream"); CV_WARN("Could not allocate stream");
return NULL; return NULL;
...@@ -1391,13 +1391,10 @@ bool CvVideoWriter_FFMPEG::open( const char * filename, int fourcc, ...@@ -1391,13 +1391,10 @@ bool CvVideoWriter_FFMPEG::open( const char * filename, int fourcc,
/* set the output parameters (must be done even if no /* set the output parameters (must be done even if no
parameters). */ parameters). */
#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0) #if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0)
if (av_set_parameters(oc, NULL) < 0) if (av_set_parameters(oc, NULL) < 0) {
#else
if (avformat_write_header(oc, NULL) < 0)
#endif
{
return false; return false;
} }
#endif
#if FF_API_DUMP_FORMAT #if FF_API_DUMP_FORMAT
dump_format(oc, 0, filename, 1); dump_format(oc, 0, filename, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment