[vlc-devel] [PATCH v2 19/20] filter_chain: do not drain pictures inside filter_chain_VideoFilter()
Steve Lhomme
robux4 at ycbcr.xyz
Wed Oct 14 14:39:19 CEST 2020
Only do normal filtering. Proper draining after sending the source picture
to the filter chain should be done separately. A NULL picture is not allowed
anymore in filter_chain_VideoFilter().
---
src/misc/filter_chain.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c
index d20bfff302a..ea3925f7daa 100644
--- a/src/misc/filter_chain.c
+++ b/src/misc/filter_chain.c
@@ -444,15 +444,20 @@ static picture_t *FilterChainVideoFilter( chained_filter_t *f, picture_t *p_pic
return p_pic;
}
-picture_t *filter_chain_VideoFilter( filter_chain_t *p_chain, picture_t *p_pic )
+static picture_t *filter_chained( chained_filter_t *f, picture_t *p_pic )
{
- if( p_pic )
+ for( ; f != NULL; f = f->next )
{
- p_pic = FilterChainVideoFilter( p_chain->first, p_pic );
- if( p_pic )
- return p_pic;
+ p_pic = f->filter.ops->filter_video( &f->filter, p_pic );
+ if( unlikely(!p_pic) )
+ break;
}
- return filter_chain_VideoDrain( p_chain );
+ return p_pic;
+}
+
+picture_t *filter_chain_VideoFilter( filter_chain_t *p_chain, picture_t *p_pic )
+{
+ return filter_chained( p_chain->first, p_pic );
}
picture_t *filter_chain_VideoDrain(filter_chain_t *p_chain)
--
2.26.2
More information about the vlc-devel
mailing list