summaryrefslogtreecommitdiffstats
path: root/video/decode/vd_lavc.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r--video/decode/vd_lavc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 120555b283..3ee8cc7932 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -733,8 +733,7 @@ static int decode(struct sh_video *sh, struct demux_packet *packet, void *data,
struct mp_image new = {0};
new.type = MP_IMGTYPE_EXPORT;
new.flags = MP_IMGFLAG_PRESERVE;
- new.w = new.width = avctx->width;
- new.h = new.height = avctx->height;
+ mp_image_set_size(&new, avctx->width, avctx->height);
mp_image_setfmt(&new, ctx->best_csp);
for (int i = 0; i < 4; i++) {
new.planes[i] = pic->data[i];