[vlc-commits] demux: ts: don't append empty ts packets into PES (refs #23654)

Francois Cartegnie git at videolan.org
Thu Jan 23 21:12:50 CET 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jan 21 15:35:52 2020 +0100| [8210974f589be933cc9c9150d8d43f2052bce063] | committer: Francois Cartegnie

demux: ts: don't append empty ts packets into PES (refs #23654)

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

 modules/demux/mpeg/ts_pes.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/demux/mpeg/ts_pes.c b/modules/demux/mpeg/ts_pes.c
index 2f04eddf8c..8b2d262d52 100644
--- a/modules/demux/mpeg/ts_pes.c
+++ b/modules/demux/mpeg/ts_pes.c
@@ -116,6 +116,12 @@ static bool ts_pes_Push( ts_pes_parse_callback *cb,
     if( p_pkt == NULL )
         return b_ret;
 
+    if( p_pkt->i_buffer == 0 )
+    {
+        block_Release( p_pkt );
+        return b_ret;
+    }
+
     if( !b_unit_start && p_pes->gather.p_data == NULL )
     {
         /* msg_Dbg( p_demux, "broken packet" ); */



More information about the vlc-commits mailing list