[vlc-commits] demux: ts: don't try to decode and warn on scrambled PES

Francois Cartegnie git at videolan.org
Sat Aug 30 07:04:38 CEST 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Aug 22 18:09:42 2014 +0900| [c03f0964573e8fe5ffb7fec7d570b5b91e424fb7] | committer: Francois Cartegnie

demux: ts: don't try to decode and warn on scrambled PES

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

 modules/demux/ts.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index 22e0f59..2f9ec3c 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -1567,10 +1567,11 @@ static void ParsePES( demux_t *p_demux, ts_pid_t *pid, block_t *p_pes )
     /* FIXME find real max size */
     /* const int i_max = */ block_ChainExtract( p_pes, header, 34 );
 
-    if( header[0] != 0 || header[1] != 0 || header[2] != 1 )
+    if( pid->b_scrambled || header[0] != 0 || header[1] != 0 || header[2] != 1 )
     {
-        msg_Warn( p_demux, "invalid header [0x%02x:%02x:%02x:%02x] (pid: %d)",
-                    header[0], header[1],header[2],header[3], pid->i_pid );
+        if ( !pid->b_scrambled )
+            msg_Warn( p_demux, "invalid header [0x%02x:%02x:%02x:%02x] (pid: %d)",
+                        header[0], header[1],header[2],header[3], pid->i_pid );
         block_ChainRelease( p_pes );
         return;
     }



More information about the vlc-commits mailing list