[vlc-devel] [PATCH] mpeg: ts: fix all streams being selected by default

Thomas Guillem thomas at gllm.fr
Tue Jul 9 14:30:59 CEST 2019


*pb_stream_selected is always true when entering HasSelectedES(), therefore the
for loop was never iterating through ES to to get the (not) selected state..

Regression from 0953364df2f1dc1bd221f99c1029bb4c8bc9d4d3
---
 modules/demux/mpeg/ts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index ce70347774..8f3ee95597 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -799,7 +799,7 @@ static int EITCurrentEventTime( const ts_pmt_t *p_pmt, demux_sys_t *p_sys,
 static inline void HasSelectedES( es_out_t *out, const ts_es_t *p_es,
                                   const ts_pmt_t *p_pmt, bool *pb_stream_selected )
 {
-    for( ; p_es && !*pb_stream_selected; p_es = p_es->p_next )
+    for( ; p_es && *pb_stream_selected; p_es = p_es->p_next )
     {
         if( p_es->id )
             es_out_Control( out, ES_OUT_GET_ES_STATE,
-- 
2.20.1



More information about the vlc-devel mailing list