From f569d245ba37898a79e853cb6fbd906dd992b531 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 18 May 2013 11:44:17 +0200 Subject: 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(). --- video/decode/dec_video.c | 1 + 1 file changed, 1 insertion(+) (limited to 'video/decode/dec_video.c') 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; -- cgit v1.2.3