mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Fixed compiling error for ffmpeg with libavcodec less than 53.4.0
This commit is contained in:
parent
010e73010c
commit
484fe1d598
@ -651,8 +651,14 @@ cv::Mat CvCapture_FFMPEG_2::read()
|
|||||||
|
|
||||||
avpicture_fill(reinterpret_cast<AVPicture*>(rgb_picture), buffer, PIX_FMT_RGB24, avcodec_context->width, avcodec_context->height);
|
avpicture_fill(reinterpret_cast<AVPicture*>(rgb_picture), buffer, PIX_FMT_RGB24, avcodec_context->width, avcodec_context->height);
|
||||||
|
|
||||||
width = picture->width;
|
#if LIBAVCODEC_VERSION_INT >= ((53<<16)+(4<<8)+0)
|
||||||
height = picture->height;
|
|
||||||
|
width = picture->width;
|
||||||
|
height = picture->height;
|
||||||
|
#else
|
||||||
|
width = avcodec_context->width;
|
||||||
|
height = avcodec_context->height;
|
||||||
|
#endif
|
||||||
|
|
||||||
struct SwsContext * img_convert_ctx = sws_getContext(
|
struct SwsContext * img_convert_ctx = sws_getContext(
|
||||||
width, height,
|
width, height,
|
||||||
|
Loading…
Reference in New Issue
Block a user