[FFmpeg-cvslog] mpegvideo: Return correct coded frame sizes from parser

Mark Thompson git at videolan.org
Fri Mar 31 23:10:02 EEST 2017


ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Wed Oct 26 21:12:02 2016 +0100| [3297577f3eac1c87d48dedd527942de2bd28e7a5] | committer: Mark Thompson

mpegvideo: Return correct coded frame sizes from parser

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3297577f3eac1c87d48dedd527942de2bd28e7a5
---

 libavcodec/mpegvideo_parser.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c
index 3630375..27f2985 100644
--- a/libavcodec/mpegvideo_parser.c
+++ b/libavcodec/mpegvideo_parser.c
@@ -151,8 +151,10 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
 
     if (pix_fmt != AV_PIX_FMT_NONE) {
         s->format = pix_fmt;
-        s->width  = s->coded_width  = pc->width;
-        s->height = s->coded_height = pc->height;
+        s->width  = pc->width;
+        s->height = pc->height;
+        s->coded_width  = FFALIGN(pc->width,  16);
+        s->coded_height = FFALIGN(pc->height, 16);
     }
 
 #if FF_API_AVCTX_TIMEBASE



More information about the ffmpeg-cvslog mailing list