summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mpvcore/mplayer.c1
-rw-r--r--video/decode/vd_lavc.c4
-rw-r--r--video/filter/vf.c1
-rw-r--r--video/out/vo.c2
-rw-r--r--video/out/vo_x11.c4
-rw-r--r--video/out/vo_xv.c4
6 files changed, 5 insertions, 11 deletions
diff --git a/mpvcore/mplayer.c b/mpvcore/mplayer.c
index 0a25680364..ed7fbec15e 100644
--- a/mpvcore/mplayer.c
+++ b/mpvcore/mplayer.c
@@ -2509,6 +2509,7 @@ static void filter_video(struct MPContext *mpctx, struct mp_image *frame)
struct sh_video *sh_video = mpctx->sh_video;
frame->pts = sh_video->pts;
+ mp_image_set_params(frame, sh_video->vf_input);
vf_filter_frame(sh_video->vfilter, frame);
filter_output_queued_frame(mpctx);
}
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 5303d1f748..838a3deab2 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -748,9 +748,7 @@ static int decode(struct sh_video *sh, struct demux_packet *packet,
if (ctx->hwdec && ctx->hwdec->process_image)
mpi = ctx->hwdec->process_image(ctx, mpi);
- mpi->colorspace = ctx->image_params.colorspace;
- mpi->levels = ctx->image_params.colorlevels;
- mpi->chroma_location = ctx->image_params.chroma_location;
+ mp_image_set_params(mpi, &ctx->image_params);
*out_image = mpi;
return 1;
diff --git a/video/filter/vf.c b/video/filter/vf.c
index f074c2059b..85a03cfa85 100644
--- a/video/filter/vf.c
+++ b/video/filter/vf.c
@@ -155,6 +155,7 @@ static void vf_fix_img_params(struct mp_image *img, struct mp_image_params *p)
img->colorspace = p->colorspace;
img->levels = p->colorlevels;
img->chroma_location = p->chroma_location;
+ mp_image_set_display_size(img, p->d_w, p->d_h);
}
// Get a new image for filter output, with size and pixel format according to
diff --git a/video/out/vo.c b/video/out/vo.c
index 1237ae0a23..f3fc4aca4d 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -404,8 +404,6 @@ int vo_reconfig(struct vo *vo, struct mp_image_params *params, int flags)
vo->dheight = d_height;
struct mp_image_params p2 = *params;
- p2.d_w = vo->aspdat.prew;
- p2.d_h = vo->aspdat.preh;
int ret;
if (vo->driver->reconfig) {
diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c
index 21da245b2c..95f4ba299c 100644
--- a/video/out/vo_x11.c
+++ b/video/out/vo_x11.c
@@ -440,9 +440,7 @@ static mp_image_t *get_screenshot(struct vo *vo)
if (!p->original_image)
return NULL;
- struct mp_image *res = mp_image_new_ref(p->original_image);
- mp_image_set_display_size(res, vo->aspdat.prew, vo->aspdat.preh);
- return res;
+ return mp_image_new_ref(p->original_image);
}
static void wait_for_completion(struct vo *vo, int max_outstanding)
diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c
index 8f652d991b..731710d0af 100644
--- a/video/out/vo_xv.c
+++ b/video/out/vo_xv.c
@@ -650,9 +650,7 @@ static mp_image_t *get_screenshot(struct vo *vo)
if (!ctx->original_image)
return NULL;
- struct mp_image *res = mp_image_new_ref(ctx->original_image);
- mp_image_set_display_size(res, vo->aspdat.prew, vo->aspdat.preh);
- return res;
+ return mp_image_new_ref(ctx->original_image);
}
static void draw_image(struct vo *vo, mp_image_t *mpi)