mirror of
https://github.com/opencv/opencv.git
synced 2025-08-05 22:19:14 +08:00
fix: libavcodec version check for AVDISCARD_NONINTRA
- AVDISCARD_NONINTRA flag is supported only for FFMPEG libraries pack
This commit is contained in:
parent
e503ac508e
commit
f7e524cbe6
@ -993,7 +993,10 @@ bool CvCapture_FFMPEG::open( const char* _filename )
|
||||
enc->skip_frame = AVDISCARD_DEFAULT;
|
||||
else if (strcmp(avdiscard_entry->value, "none") == 0)
|
||||
enc->skip_frame = AVDISCARD_NONE;
|
||||
#if LIBAVCODEC_BUILD >= CALC_FFMPEG_VERSION(54, 59, 100)
|
||||
// NONINTRA flag was introduced with version bump at revision:
|
||||
// https://github.com/FFmpeg/FFmpeg/commit/b152152df3b778d0a86dcda5d4f5d065b4175a7b
|
||||
// This key is supported only for FFMPEG version
|
||||
#if LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_BUILD >= CALC_FFMPEG_VERSION(55, 67, 100)
|
||||
else if (strcmp(avdiscard_entry->value, "nonintra") == 0)
|
||||
enc->skip_frame = AVDISCARD_NONINTRA;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user