From: Alexander Reshetnikov Date: Mon, 19 Mar 2012 09:05:55 +0000 (+0000) Subject: Fixed compiling error for ffmpeg with libavcodec less than 53.4.0 X-Git-Tag: accepted/2.0/20130307.220821~1108 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=484fe1d5980ecf25752c6bf9ca98a1e41e9b0fdd;p=profile%2Fivi%2Fopencv.git Fixed compiling error for ffmpeg with libavcodec less than 53.4.0 --- diff --git a/modules/highgui/src/cap_ffmpeg_impl_v2.hpp b/modules/highgui/src/cap_ffmpeg_impl_v2.hpp index 16e070b..886f55e 100755 --- a/modules/highgui/src/cap_ffmpeg_impl_v2.hpp +++ b/modules/highgui/src/cap_ffmpeg_impl_v2.hpp @@ -651,8 +651,14 @@ cv::Mat CvCapture_FFMPEG_2::read() avpicture_fill(reinterpret_cast(rgb_picture), buffer, PIX_FMT_RGB24, avcodec_context->width, avcodec_context->height); - width = picture->width; - height = picture->height; + #if LIBAVCODEC_VERSION_INT >= ((53<<16)+(4<<8)+0) + + width = picture->width; + height = picture->height; + #else + width = avcodec_context->width; + height = avcodec_context->height; + #endif struct SwsContext * img_convert_ctx = sws_getContext( width, height,