]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/loco: rotate other planes too for non-power of 2 widths
authorPaul B Mahol <onemda@gmail.com>
Tue, 11 Sep 2018 08:15:59 +0000 (10:15 +0200)
committerPaul B Mahol <onemda@gmail.com>
Tue, 11 Sep 2018 08:15:59 +0000 (10:15 +0200)
This was forgotten in df05fd3131fd94d01ebeaa58b4c60510961b8be2.

libavcodec/loco.c

index f91d8709b07a459d3508cc5aee5464708bec2da1..741db3bdcece517cb6b0216a32f3d7e4b5f1aac0 100644 (file)
@@ -235,8 +235,11 @@ static int decode_frame(AVCodecContext *avctx,
         ADVANCE_BY_DECODED;
         decoded = loco_decode_plane(l, p->data[2] + p->linesize[2]*(avctx->height-1), avctx->width, avctx->height,
                                     -p->linesize[2], buf, buf_size);
-        if (avctx->width & 1)
+        if (avctx->width & 1) {
+            rotate_faulty_loco(p->data[0] + p->linesize[0]*(avctx->height-1), avctx->width, avctx->height, -p->linesize[0]);
             rotate_faulty_loco(p->data[1] + p->linesize[1]*(avctx->height-1), avctx->width, avctx->height, -p->linesize[1]);
+            rotate_faulty_loco(p->data[2] + p->linesize[2]*(avctx->height-1), avctx->width, avctx->height, -p->linesize[2]);
+        }
         break;
     case LOCO_CRGBA:
     case LOCO_RGBA: