[vlc-commits] demux: ts: ignore null packets

Francois Cartegnie git at videolan.org
Fri Jul 21 11:54:08 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Jul 21 10:46:34 2017 +0200| [2899ca34f4cbc8a3947cf673827983ac7a659ce0] | committer: Francois Cartegnie

demux: ts: ignore null packets

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

 modules/demux/mpeg/ts.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index 0e7a64f28d..a6790f0388 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -2393,6 +2393,13 @@ static block_t * ProcessTSPacket( demux_t *p_demux, ts_pid_t *pid, block_t *p_pk
              b_payload, i_cc );
 #endif
 
+    /* Drop null packets */
+    if( unlikely(pid->i_pid == 0x1FFF) )
+    {
+        block_Release( p_pkt );
+        return NULL;
+    }
+
     /* For now, ignore additional error correction
      * TODO: handle Reed-Solomon 204,188 error correction */
     p_pkt->i_buffer = TS_PACKET_SIZE_188;



More information about the vlc-commits mailing list