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

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


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

demux: ts: fix scrambled flag change

refactorings... :/

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

 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..f6e4875 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