diff options
author | wm4 <wm4@nowhere> | 2015-07-21 21:54:15 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-07-21 21:54:15 +0200 |
commit | a357d39369737f2f6608c669fac13d26e6c6b33a (patch) | |
tree | 64f9669b5e8883814c6ad45d4e8f7ea869e602fa /player/video.c | |
parent | e5fac76b3bd0df964cb39eba525f56721e57a5b2 (diff) | |
download | mpv-a357d39369737f2f6608c669fac13d26e6c6b33a.tar.bz2 mpv-a357d39369737f2f6608c669fac13d26e6c6b33a.tar.xz |
video: always re-probe auto deint filter on filter reconfig
If filters are disabled or reconfigured, attempt to remove and probe the
deinterlace filter again. This fixes behavior if e.g. a software deint
filter was automatically inserted, and then hardware decoding is enabled
during playback. Without this commit, initializing hw decoding would
fail because of the software filter; with this commit, it'll replace it
with the hw deinterlacer instead.
Diffstat (limited to 'player/video.c')
-rw-r--r-- | player/video.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/player/video.c b/player/video.c index 57ec9d64d1..763f2e5a81 100644 --- a/player/video.c +++ b/player/video.c @@ -231,6 +231,7 @@ void uninit_video_chain(struct MPContext *mpctx) mpctx->video_status = STATUS_EOF; mpctx->sync_audio_to_video = false; reselect_demux_streams(mpctx); + remove_deint_filter(mpctx); } mp_notify(mpctx, MPV_EVENT_VIDEO_RECONFIG, NULL); } @@ -423,8 +424,10 @@ static void init_filter_params(struct MPContext *mpctx) // recreate the chain a second time, which is not very elegant, but allows // us to test whether enabling deinterlacing works with the current video // format and other filters. - if (opts->deinterlace >= 0) - mp_property_do("deinterlace", M_PROPERTY_SET, &opts->deinterlace, mpctx); + if (opts->deinterlace >= 0) { + remove_deint_filter(mpctx); + set_deinterlacing(mpctx, opts->deinterlace != 0); + } } // Feed newly decoded frames to the filter, take care of format changes. |