summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libaomdec.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libavcodec/libaomdec.c b/libavcodec/libaomdec.c
index d6b822fda2..64a627ed1c 100644
--- a/libavcodec/libaomdec.c
+++ b/libavcodec/libaomdec.c
@@ -224,9 +224,13 @@ static int aom_decode(AVCodecContext *avctx, void *data, int *got_frame,
if ((img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) && img->bit_depth == 8)
image_copy_16_to_8(picture, img);
- else
- av_image_copy(picture->data, picture->linesize, (const uint8_t **)img->planes,
- img->stride, avctx->pix_fmt, img->d_w, img->d_h);
+ else {
+ const uint8_t *planes[4] = { img->planes[0], img->planes[1], img->planes[2] };
+ const int stride[4] = { img->stride[0], img->stride[1], img->stride[2] };
+
+ av_image_copy(picture->data, picture->linesize, planes,
+ stride, avctx->pix_fmt, img->d_w, img->d_h);
+ }
*got_frame = 1;
}
return avpkt->size;