[vlc-commits] vout: reinitialize interlacing from ThreadReinit
Thomas Guillem
git at videolan.org
Mon Apr 10 16:33:49 CEST 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Apr 10 16:11:20 2017 +0200| [9d6e05871544f36156c79c3eab665668c9461ac8] | committer: Thomas Guillem
vout: reinitialize interlacing from ThreadReinit
In order to not wait for 30 seconds before unloading the deinterlace filter
when opening a new video (if the vout is re-used).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9d6e05871544f36156c79c3eab665668c9461ac8
---
src/video_output/interlacing.c | 6 ++++++
src/video_output/interlacing.h | 1 +
src/video_output/video_output.c | 2 ++
3 files changed, 9 insertions(+)
diff --git a/src/video_output/interlacing.c b/src/video_output/interlacing.c
index c68068028d..308493e6ca 100644
--- a/src/video_output/interlacing.c
+++ b/src/video_output/interlacing.c
@@ -237,6 +237,12 @@ void vout_InitInterlacingSupport(vout_thread_t *vout, bool is_interlaced)
vout->p->interlacing.date = mdate();
}
+void vout_ReinitInterlacingSupport(vout_thread_t *vout)
+{
+ vout->p->interlacing.is_interlaced = false;
+ var_SetBool(vout, "deinterlace-needed", false);
+}
+
void vout_SetInterlacingState(vout_thread_t *vout, bool is_interlaced)
{
/* Wait 30s before quiting interlacing mode */
diff --git a/src/video_output/interlacing.h b/src/video_output/interlacing.h
index 9c6e04f616..7000f36be6 100644
--- a/src/video_output/interlacing.h
+++ b/src/video_output/interlacing.h
@@ -25,6 +25,7 @@
#define LIBVLC_VOUT_INTERLACING_H
void vout_InitInterlacingSupport(vout_thread_t *, bool is_interlaced);
+void vout_ReinitInterlacingSupport(vout_thread_t *);
void vout_SetInterlacingState(vout_thread_t *, bool is_interlaced);
#endif
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index e752355f30..3567617167 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1489,6 +1489,8 @@ static int ThreadReinit(vout_thread_t *vout,
ThreadStop(vout, &state);
+ vout_ReinitInterlacingSupport(vout);
+
if (!state.cfg.is_fullscreen) {
state.cfg.display.width = 0;
state.cfg.display.height = 0;
More information about the vlc-commits
mailing list