diff options
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 6 | ||||
-rw-r--r-- | player/sub.c | 2 | ||||
-rw-r--r-- | player/video.c | 8 |
3 files changed, 9 insertions, 7 deletions
diff --git a/player/command.c b/player/command.c index 0bee671e88..f2f73059ef 100644 --- a/player/command.c +++ b/player/command.c @@ -2512,8 +2512,8 @@ static int mp_property_vd_imgparams(void *ctx, struct m_property *prop, if (!vd) return M_PROPERTY_UNAVAILABLE; struct mp_codec_params *c = vd->header->codec; - if (vd->vfilter->override_params.imgfmt) { - return property_imgparams(vd->vfilter->override_params, action, arg); + if (vd->vfilter->input_params.imgfmt) { + return property_imgparams(vd->vfilter->input_params, action, arg); } else if (c->disp_w && c->disp_h) { // Simplistic fallback for stupid scripts querying "width"/"height" // before the first frame is decoded. @@ -2779,7 +2779,7 @@ static int mp_property_aspect(void *ctx, struct m_property *prop, if (mpctx->d_video && aspect <= 0) { struct dec_video *d_video = mpctx->d_video; struct mp_codec_params *c = d_video->header->codec; - struct mp_image_params *params = &d_video->vfilter->override_params; + struct mp_image_params *params = &d_video->vfilter->input_params; if (params && params->p_w > 0 && params->p_h > 0) { int d_w, d_h; mp_image_params_get_dsize(params, &d_w, &d_h); diff --git a/player/sub.c b/player/sub.c index 0492be4bc8..c20df53c60 100644 --- a/player/sub.c +++ b/player/sub.c @@ -78,7 +78,7 @@ static bool update_subtitle(struct MPContext *mpctx, double video_pts, int order return true; if (mpctx->d_video) { - struct mp_image_params params = mpctx->d_video->vfilter->override_params; + struct mp_image_params params = mpctx->d_video->vfilter->input_params; if (params.imgfmt) sub_control(dec_sub, SD_CTRL_SET_VIDEO_PARAMS, ¶ms); } diff --git a/player/video.c b/player/video.c index 33f3b4b970..9ec7eacb74 100644 --- a/player/video.c +++ b/player/video.c @@ -84,10 +84,10 @@ static int try_filter(struct MPContext *mpctx, struct mp_image_params params, vf->label = talloc_strdup(vf, label); - if (video_reconfig_filters(d_video, ¶ms) < 0) { + if (vf_reconfig(d_video->vfilter, ¶ms) < 0) { vf_remove_filter(d_video->vfilter, vf); // restore - video_reconfig_filters(d_video, ¶ms); + vf_reconfig(d_video->vfilter, ¶ms); return -1; } return 0; @@ -107,7 +107,7 @@ static void filter_reconfig(struct MPContext *mpctx, set_allowed_vo_formats(d_video->vfilter, mpctx->video_out); - if (video_reconfig_filters(d_video, ¶ms) < 0) { + if (vf_reconfig(d_video->vfilter, ¶ms) < 0) { // Most video filters don't work with hardware decoding, so this // might be the reason why filter reconfig failed. if (!probe_only && @@ -119,6 +119,8 @@ static void filter_reconfig(struct MPContext *mpctx, mp_image_unrefp(&d_video->waiting_decoded_mpi); d_video->decoder_output = (struct mp_image_params){0}; MP_VERBOSE(mpctx, "hwdec falback due to filters.\n"); + } else { + MP_FATAL(mpctx, "Cannot initialize video filters.\n"); } return; } |