[vlc-commits] demux: ts: drop blocks and cleanup for es without decoders

Francois Cartegnie git at videolan.org
Sat Jan 28 14:03:45 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Jan 28 11:44:12 2017 +0100| [8e7789b081b1de39dbd8834af54bb74c23f6785a] | committer: Francois Cartegnie

demux: ts: drop blocks and cleanup for es without decoders

unlikely

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

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

diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index 7d8c21af1..a44aa1f 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -1597,6 +1597,14 @@ static void ParsePESDataChain( demux_t *p_demux, ts_pid_t *pid, block_t *p_pes )
                     PCRFixHandle( p_demux, p_pmt, p_block );
 
                 block_ChainLastAppend( &pid->u.p_pes->prepcr.pp_last, p_block );
+
+                /* PCR Seen and no es->id, cleanup current and prepcr blocks */
+                if( p_pmt->pcr.i_current > -1)
+                {
+                    block_ChainRelease( pid->u.p_pes->prepcr.p_head );
+                    pid->u.p_pes->prepcr.p_head = NULL;
+                    pid->u.p_pes->prepcr.pp_last = &pid->u.p_pes->prepcr.p_head;
+                }
             }
         }
     }



More information about the vlc-commits mailing list