diff options
author | wm4 <wm4@nowhere> | 2020-02-16 15:28:57 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-02-16 15:28:57 +0100 |
commit | a19d918816866180a4ddc8be371dfb8b9394fc28 (patch) | |
tree | f852d5dd0953c11f172df097b05adfcee096ff5f /filters | |
parent | 7d11eda72e90d7aa9df25127bd810aa7b191029c (diff) | |
download | mpv-a19d918816866180a4ddc8be371dfb8b9394fc28.tar.bz2 mpv-a19d918816866180a4ddc8be371dfb8b9394fc28.tar.xz |
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
Diffstat (limited to 'filters')
-rw-r--r-- | filters/f_auto_filters.c | 11 |
1 files changed, 8 insertions, 3 deletions
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); } |