[vlc-commits] vout: also flush vd render filters
Thomas Guillem
git at videolan.org
Fri Sep 29 18:09:24 CEST 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Sep 29 18:04:23 2017 +0200| [d94db1b1b9caf76f174952a30c21376410b46c14] | committer: Thomas Guillem
vout: also flush vd render filters
This fixes a video freeze after a seek with VDPAU HW rendering. Indeed, the
VLC_CODEC_VDPAU_OUTPUT video converter need to be flushed to clear pictures
history.
Fixes #18423
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d94db1b1b9caf76f174952a30c21376410b46c14
---
include/vlc_vout_wrapper.h | 1 +
src/video_output/display.c | 8 ++++++++
src/video_output/video_output.c | 1 +
3 files changed, 10 insertions(+)
diff --git a/include/vlc_vout_wrapper.h b/include/vlc_vout_wrapper.h
index 8ad826f6cc..7c115473f8 100644
--- a/include/vlc_vout_wrapper.h
+++ b/include/vlc_vout_wrapper.h
@@ -80,6 +80,7 @@ vout_display_t *vout_NewDisplay( vout_thread_t *, const video_format_t *,
void vout_DeleteDisplay(vout_display_t *, vout_display_state_t *);
bool vout_IsDisplayFiltered(vout_display_t *);
picture_t * vout_FilterDisplay(vout_display_t *, picture_t *);
+void vout_FilterFlush(vout_display_t *);
bool vout_AreDisplayPicturesInvalid(vout_display_t *);
bool vout_ManageDisplay(vout_display_t *, bool allow_reset_pictures);
diff --git a/src/video_output/display.c b/src/video_output/display.c
index e40997b573..3a6bba01dc 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -993,6 +993,14 @@ picture_t *vout_FilterDisplay(vout_display_t *vd, picture_t *picture)
return filter_chain_VideoFilter(osys->filters, picture);
}
+void vout_FilterFlush(vout_display_t *vd)
+{
+ vout_display_owner_sys_t *osys = vd->owner.sys;
+
+ if (osys->filters != NULL)
+ filter_chain_VideoFlush(osys->filters);
+}
+
void vout_UpdateDisplaySourceProperties(vout_display_t *vd, const video_format_t *source)
{
vout_display_owner_sys_t *osys = vd->owner.sys;
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index efb342de9f..10e1d87c26 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1259,6 +1259,7 @@ static void ThreadFlush(vout_thread_t *vout, bool below, mtime_t date)
}
picture_fifo_Flush(vout->p->decoder_fifo, date, below);
+ vout_FilterFlush(vout->p->display.vd);
}
static void ThreadStep(vout_thread_t *vout, mtime_t *duration)
More information about the vlc-commits
mailing list