summaryrefslogtreecommitdiffstats
path: root/video/mp_image.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/mp_image.c')
-rw-r--r--video/mp_image.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/video/mp_image.c b/video/mp_image.c
index ec8f14fc34..85c174dfaa 100644
--- a/video/mp_image.c
+++ b/video/mp_image.c
@@ -152,15 +152,14 @@ static int mp_chroma_div_up(int size, int shift)
// Caller has to make sure this doesn't exceed the allocated plane data/strides.
void mp_image_set_size(struct mp_image *mpi, int w, int h)
{
- mpi->w = w;
- mpi->h = h;
+ mpi->w = mpi->display_w = w;
+ mpi->h = mpi->display_h = h;
for (int n = 0; n < mpi->num_planes; n++) {
mpi->plane_w[n] = mp_chroma_div_up(mpi->w, mpi->fmt.xs[n]);
mpi->plane_h[n] = mp_chroma_div_up(mpi->h, mpi->fmt.ys[n]);
}
mpi->chroma_width = mpi->plane_w[1];
mpi->chroma_height = mpi->plane_h[1];
- mpi->display_w = mpi->display_h = 0;
}
void mp_image_set_display_size(struct mp_image *mpi, int dw, int dh)