summaryrefslogtreecommitdiffstats
path: root/video/decode/dec_video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-05-18 11:44:17 +0200
committerwm4 <wm4@nowhere>2013-05-18 17:45:54 +0200
commitf569d245ba37898a79e853cb6fbd906dd992b531 (patch)
tree713d484af2df18abf8c388863ea6341d64a981aa /video/decode/dec_video.c
parentd1b37aff32f459e2d9fd8361beb14138458012ec (diff)
downloadmpv-f569d245ba37898a79e853cb6fbd906dd992b531.tar.bz2
mpv-f569d245ba37898a79e853cb6fbd906dd992b531.tar.xz
core: allow changing filter filters at runtime
Add the "vf" command, which allows changing the video filter chain at runtime. For example, the 'y' key could be bound to toggle deinterlacing by adding 'y vf toggle yadif' to the input.conf. Reconfiguring the video filter chain normally resets the VO, so that it will be "stuck" until a new video frame is rendered. To mitigate this, a seek to the current position is issued when the filter chain is changed. This is done only if playback is paused, because normal playback will show an actual new frame quickly enough. If vdpau hardware decoding is used, filter insertion (whether it fails or not) will break the video for a while. This is because vo_vdpau resets decoding related things on vo_config().
Diffstat (limited to 'video/decode/dec_video.c')
-rw-r--r--video/decode/dec_video.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c
index 1dd83db8bd..5e55e78220 100644
--- a/video/decode/dec_video.c
+++ b/video/decode/dec_video.c
@@ -184,6 +184,7 @@ void uninit_video(sh_video_t *sh_video)
mp_tmsg(MSGT_DECVIDEO, MSGL_V, "Uninit video.\n");
sh_video->vd_driver->uninit(sh_video);
vf_uninit_filter_chain(sh_video->vfilter);
+ sh_video->vfilter = NULL;
talloc_free(sh_video->gsh->decoder_desc);
sh_video->gsh->decoder_desc = NULL;
sh_video->initialized = 0;