[vlc-devel] [PATCH] filter_chain: check the fmt_out didn't change when it's not allowed
Steve Lhomme
robux4 at videolabs.io
Wed Jul 19 16:05:23 CEST 2017
es_format_IsSimilar() may not be strong enough.
Use chain->b_allow_fmt_out_change in case some funny filters thing they can
change it.
---
src/misc/filter_chain.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c
index fc4bdb4be4..87808f672e 100644
--- a/src/misc/filter_chain.c
+++ b/src/misc/filter_chain.c
@@ -247,11 +247,15 @@ static filter_t *filter_chain_AppendInner( filter_chain_t *chain,
if( filter->p_module == NULL )
goto error;
- if( filter->b_allow_fmt_out_change )
+ if( chain->b_allow_fmt_out_change )
{
es_format_Clean( &chain->fmt_out );
es_format_Copy( &chain->fmt_out, &filter->fmt_out );
}
+ else
+ {
+ assert( es_format_IsSimilar( fmt_out, &filter->fmt_out ) );
+ }
if( chain->last == NULL )
{
--
2.12.1
More information about the vlc-devel
mailing list