[FFmpeg-devel] [PATCH] v210dec: Fix width calculation

Kieran Kunhya kierank at obe.tv
Sat Nov 22 20:11:57 CET 2014


---
 libavcodec/v210dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
index ae03952..978dffe 100644
--- a/libavcodec/v210dec.c
+++ b/libavcodec/v210dec.c
@@ -117,7 +117,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
         const uint32_t *src = (const uint32_t*)psrc;
         uint32_t val;
 
-        w = (avctx->width / 6) * 6;
+        w = ((avctx->width - 5) / 6) * 6;
         s->unpack_frame(src, y, u, v, w);
 
         y += w;
-- 
1.9.1



More information about the ffmpeg-devel mailing list