From 50a0a167f07fca8a0b7ee324eac7708a67154650 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 2 Oct 2015 18:27:18 +0300 Subject: [PATCH] fix ffmpeg frame creation (fix #5439) --- modules/videoio/src/cap_ffmpeg_impl.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp index 4f743ec76..e869f1b1e 100644 --- a/modules/videoio/src/cap_ffmpeg_impl.hpp +++ b/modules/videoio/src/cap_ffmpeg_impl.hpp @@ -1130,6 +1130,11 @@ static AVFrame * icv_alloc_picture_FFMPEG(int pix_fmt, int width, int height, bo #endif if (!picture) return NULL; + + picture->format = pix_fmt; + picture->width = width; + picture->height = height; + size = avpicture_get_size( (AVPixelFormat) pix_fmt, width, height); if(alloc){ picture_buf = (uint8_t *) malloc(size);