[vlc-commits] video_chroma/chain: flush the filter chain when the filter is flushed

Steve Lhomme git at videolan.org
Mon Oct 12 15:55:45 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Oct  9 10:20:10 2020 +0200| [1baf14bb086094b88234b1a51b26276fcc7243b7] | committer: Steve Lhomme

video_chroma/chain: flush the filter chain when the filter is flushed

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1baf14bb086094b88234b1a51b26276fcc7243b7
---

 modules/video_chroma/chain.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/modules/video_chroma/chain.c b/modules/video_chroma/chain.c
index c25711c7d3..630526016d 100644
--- a/modules/video_chroma/chain.c
+++ b/modules/video_chroma/chain.c
@@ -54,6 +54,7 @@ vlc_module_end ()
  * Local prototypes.
  *****************************************************************************/
 static picture_t *Chain         ( filter_t *, picture_t * );
+static void Flush               ( filter_t * );
 
 static int BuildTransformChain( filter_t *p_filter );
 static int BuildChromaResize( filter_t * );
@@ -154,7 +155,7 @@ static const struct filter_video_callbacks filter_video_chain_cbs =
 };
 
 static const struct vlc_filter_operations filter_ops = {
-    .filter_video = Chain,
+    .filter_video = Chain, .flush = Flush,
 };
 
 /*****************************************************************************
@@ -279,6 +280,12 @@ static picture_t *Chain( filter_t *p_filter, picture_t *p_pic )
     return filter_chain_VideoFilter( p_sys->p_chain, p_pic );
 }
 
+static void Flush( filter_t *p_filter )
+{
+    filter_sys_t *p_sys = p_filter->p_sys;
+    filter_chain_VideoFlush( p_sys->p_chain );
+}
+
 /*****************************************************************************
  * Builders
  *****************************************************************************/



More information about the vlc-commits mailing list