| 1 | diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
|
|---|
| 2 | index c6dba23..a7cac9f 100644
|
|---|
| 3 | --- a/libavcodec/v210dec.c
|
|---|
| 4 | +++ b/libavcodec/v210dec.c
|
|---|
| 5 | @@ -84,6 +84,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
|
|---|
| 6 | int aligned_width = ((avctx->width + 47) / 48) * 48;
|
|---|
| 7 | stride = aligned_width * 8 / 3;
|
|---|
| 8 | }
|
|---|
| 9 | +stride=424;
|
|---|
| 10 |
|
|---|
| 11 | if (avpkt->size < stride * avctx->height) {
|
|---|
| 12 | if ((((avctx->width + 23) / 24) * 24 * 8) / 3 * avctx->height == avpkt->size) {
|
|---|
| 13 | @@ -140,10 +141,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
|
|---|
| 14 | }
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | - psrc += stride;
|
|---|
| 18 | - y += pic->linesize[0] / 2 - avctx->width;
|
|---|
| 19 | - u += pic->linesize[1] / 2 - avctx->width / 2;
|
|---|
| 20 | - v += pic->linesize[2] / 2 - avctx->width / 2;
|
|---|
| 21 | + psrc += stride + 8 * ((h % 3)==0) - 8 * ((h % 3)==1) + 8 * ((h % 3)==2);
|
|---|
| 22 | + y += pic->linesize[0] / 2 - avctx->width + 2 * ((h % 3)==0) - 4 * ((h % 3)==1) + 2 * ((h % 3)==2);
|
|---|
| 23 | + u += pic->linesize[1] / 2 - avctx->width / 2 + 1 * ((h % 3)==0) - 2 * ((h % 3)==1) + 1 * ((h % 3)==2);
|
|---|
| 24 | + v += pic->linesize[2] / 2 - avctx->width / 2 + 1 * ((h % 3)==0) - 2 * ((h % 3)==1) + 1 * ((h % 3)==2);
|
|---|
| 25 | }
|
|---|
| 26 |
|
|---|
| 27 | if (avctx->field_order > AV_FIELD_PROGRESSIVE) {
|
|---|