From 3b7acf26573b333fb15962a8c771f8544f46d554 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Thu, 14 Nov 2013 17:25:46 +0400 Subject: [PATCH] Fix building with FFmpeg 0.8. avformat_find_stream_info was introduced in Libav avformat 53.3, but it was only merged to FFmpeg in avformat 53.6. In Libav avformat 53.3-53.5 av_find_stream_info is not removed (only deprecated), so this shouldn't break building with that. --- modules/highgui/src/cap_ffmpeg_impl.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/highgui/src/cap_ffmpeg_impl.hpp b/modules/highgui/src/cap_ffmpeg_impl.hpp index 2d8ad22236..151a0cac24 100644 --- a/modules/highgui/src/cap_ffmpeg_impl.hpp +++ b/modules/highgui/src/cap_ffmpeg_impl.hpp @@ -546,7 +546,7 @@ bool CvCapture_FFMPEG::open( const char* _filename ) goto exit_func; } err = -#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 3, 0) +#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 6, 0) avformat_find_stream_info(ic, NULL); #else av_find_stream_info(ic); @@ -2114,7 +2114,7 @@ bool InputMediaStream_FFMPEG::open(const char* fileName, int* codec, int* chroma if (err < 0) return false; - #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 3, 0) + #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 6, 0) err = avformat_find_stream_info(ctx_, 0); #else err = av_find_stream_info(ctx_);