[vlc-commits] demux: ts: fix scrambled flag change

Francois Cartegnie git at videolan.org
Mon Apr 13 21:05:13 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Apr 13 21:02:08 2015 +0200| [53715d2d19fcc623cb7e326157097363de4b017b] | committer: Francois Cartegnie

demux: ts: fix scrambled flag change

refactorings... :/

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

 modules/demux/mpeg/ts.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index bb04634..008dc77 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -2587,7 +2587,10 @@ static void UpdateScrambledState( demux_t *p_demux, ts_pid_t *p_pid, bool b_scra
     msg_Warn( p_demux, "scrambled state changed on pid %d (%d->%d)",
               p_pid->i_pid, SCRAMBLED(*p_pid), b_scrambled );
 
-    p_pid->i_flags |= (b_scrambled) ? FLAG_SCRAMBLED : FLAGS_NONE;
+    if( b_scrambled )
+        p_pid->i_flags |= FLAG_SCRAMBLED;
+    else
+        p_pid->i_flags &= ~FLAG_SCRAMBLED;
 
     if( p_pid->type == TYPE_PES && p_pid->u.p_pes->es.id )
     {



More information about the vlc-commits mailing list