@@ -993,7 +993,10 @@ bool CvCapture_FFMPEG::open( const char* _filename )
993
993
enc->skip_frame = AVDISCARD_DEFAULT;
994
994
else if (strcmp (avdiscard_entry->value , " none" ) == 0 )
995
995
enc->skip_frame = AVDISCARD_NONE;
996
- #if LIBAVCODEC_BUILD >= CALC_FFMPEG_VERSION(54, 59, 100)
996
+ // NONINTRA flag was introduced with version bump at revision:
997
+ // https://github.com/FFmpeg/FFmpeg/commit/b152152df3b778d0a86dcda5d4f5d065b4175a7b
998
+ // This key is supported only for FFMPEG version
999
+ #if LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_BUILD >= CALC_FFMPEG_VERSION(55, 67, 100)
997
1000
else if (strcmp (avdiscard_entry->value , " nonintra" ) == 0 )
998
1001
enc->skip_frame = AVDISCARD_NONINTRA;
999
1002
#endif
@@ -1949,7 +1952,9 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc,
1949
1952
// some formats want stream headers to be separate
1950
1953
if (oc->oformat ->flags & AVFMT_GLOBALHEADER)
1951
1954
{
1952
- #if LIBAVCODEC_BUILD > CALC_FFMPEG_VERSION(56, 35, 0)
1955
+ // flags were renamed: https://github.com/libav/libav/commit/7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615
1956
+ #if LIBAVCODEC_BUILD >= (LIBAVCODEC_VERSION_MICRO >= 100 \
1957
+ ? CALC_FFMPEG_VERSION (56 , 60 , 100 ) : CALC_FFMPEG_VERSION (56 , 35 , 0 ))
1953
1958
c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
1954
1959
#else
1955
1960
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
0 commit comments