[FFmpeg-cvslog] avcodec/fmvc: fix decoding of odd size videos

Paul B Mahol git at videolan.org
Fri Feb 17 11:48:21 EET 2017


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Feb 17 10:46:52 2017 +0100| [1a71df9bac4bb5840b394e76f98aa34ce0c3eebc] | committer: Paul B Mahol

avcodec/fmvc: fix decoding of odd size videos

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

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

diff --git a/libavcodec/fmvc.c b/libavcodec/fmvc.c
index 54bb6f9..c5e5b3d 100644
--- a/libavcodec/fmvc.c
+++ b/libavcodec/fmvc.c
@@ -441,7 +441,7 @@ static int decode_frame(AVCodecContext *avctx,
         for (y = 0; y < avctx->height; y++) {
             memcpy(dst, src, avctx->width * s->bpp);
             dst -= frame->linesize[0];
-            src += avctx->width * s->bpp;
+            src += s->stride * 4;
         }
     } else {
         int block, nb_blocks, type, k, l;
@@ -518,7 +518,7 @@ static int decode_frame(AVCodecContext *avctx,
         for (y = 0; y < avctx->height; y++) {
             memcpy(ddst, ssrc, avctx->width * s->bpp);
             ddst -= frame->linesize[0];
-            ssrc += avctx->width * s->bpp;
+            ssrc += s->stride * 4;
         }
     }
 



More information about the ffmpeg-cvslog mailing list