From a19d918816866180a4ddc8be371dfb8b9394fc28 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 16 Feb 2020 15:28:57 +0100 Subject: f_auto_filters: always fall back to hw-download+yadif if no hw deint filter If hw decoding is used, but no hw deinterlacer is available, even though we expect that it is present, fall back to using hw-download and yadif anyway. Until now, it was over if the hw filter was somehow missing; for example, yadif_cuda apparently requires a full Cuda SDK, so it can be missing, even if nvdec is available. (Whether this particular case works was not tested with this commit.) Fixes: #7465 --- filters/f_auto_filters.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'filters/f_auto_filters.c') diff --git a/filters/f_auto_filters.c b/filters/f_auto_filters.c index d0bab83d2c..944fe89eab 100644 --- a/filters/f_auto_filters.c +++ b/filters/f_auto_filters.c @@ -68,6 +68,7 @@ static void deint_process(struct mp_filter *f) return; } + bool has_filter = true; if (img->imgfmt == IMGFMT_VDPAU) { char *args[] = {"deint", "yes", NULL}; p->sub.filter = @@ -80,6 +81,13 @@ static void deint_process(struct mp_filter *f) p->sub.filter = mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "yadif_cuda", args); } else { + has_filter = false; + } + + if (!p->sub.filter) { + if (has_filter) + MP_ERR(f, "creating deinterlacer failed\n"); + struct mp_filter *subf = mp_bidir_dummy_filter_create(f); struct mp_filter *filters[2] = {0}; @@ -106,9 +114,6 @@ static void deint_process(struct mp_filter *f) p->sub.filter = subf; } - if (!p->sub.filter) - MP_ERR(f, "creating deinterlacer failed\n"); - mp_subfilter_continue(&p->sub); } -- cgit v1.2.3