summaryrefslogtreecommitdiff
path: root/libavcodec/loco.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-09-11 10:15:59 +0200
committerPaul B Mahol <onemda@gmail.com>2018-09-11 10:15:59 +0200
commit7115ad53b4248b25fc908df77ada0eb5e74a5ac8 (patch)
treec6af3bb9cda9f3dc91751316cc14170f98ae97bb /libavcodec/loco.c
parent5632044939910de1ededcd897777bde00cd32ecc (diff)
downloadffmpeg-7115ad53b4248b25fc908df77ada0eb5e74a5ac8.tar.gz
avcodec/loco: rotate other planes too for non-power of 2 widths
This was forgotten in df05fd3131fd94d01ebeaa58b4c60510961b8be2.
Diffstat (limited to 'libavcodec/loco.c')
-rw-r--r--libavcodec/loco.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/loco.c b/libavcodec/loco.c
index f91d8709b0..741db3bdce 100644
--- a/libavcodec/loco.c
+++ b/libavcodec/loco.c
@@ -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: