Skip to content

Commit f7e524c

Browse files
committed
fix: libavcodec version check for AVDISCARD_NONINTRA
- AVDISCARD_NONINTRA flag is supported only for FFMPEG libraries pack
1 parent e503ac5 commit f7e524c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/videoio/src/cap_ffmpeg_impl.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,10 @@ bool CvCapture_FFMPEG::open( const char* _filename )
993993
enc->skip_frame = AVDISCARD_DEFAULT;
994994
else if (strcmp(avdiscard_entry->value, "none") == 0)
995995
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)
9971000
else if (strcmp(avdiscard_entry->value, "nonintra") == 0)
9981001
enc->skip_frame = AVDISCARD_NONINTRA;
9991002
#endif

0 commit comments

Comments
 (0)