summaryrefslogtreecommitdiff
path: root/libavcodec/v210dec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/v210dec.c')
-rw-r--r--libavcodec/v210dec.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
index fd8a6b0d78..bc1e1d34ff 100644
--- a/libavcodec/v210dec.c
+++ b/libavcodec/v210dec.c
@@ -123,7 +123,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 / 12) * 12;
s->unpack_frame(src, y, u, v, w);
y += w;
@@ -131,6 +131,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
v += w >> 1;
src += (w << 1) / 3;
+ if (w < avctx->width - 5) {
+ READ_PIXELS(u, y, v);
+ READ_PIXELS(y, u, y);
+ READ_PIXELS(v, y, u);
+ READ_PIXELS(y, v, y);
+ w += 6;
+ }
+
if (w < avctx->width - 1) {
READ_PIXELS(u, y, v);