vlc | branch: master | Francois Cartegnie <[email protected]> | Mon Oct 12 
17:54:18 2020 +0200| [061a6e4e38b04f37f8954a89273ccf862a954a95] | committer: 
Francois Cartegnie

demux: ts: set pcrcount on PMT validation probing

needed for PCRFix when the PCR appears really late

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

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

diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index b529c75984..1e6e2b3b35 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -2074,6 +2074,10 @@ static int ProbeChunk( demux_t *p_demux, int i_program, 
bool b_end, bool *pb_fou
             if( b_adaptfield && p_pkt->i_buffer >= 4 + 2 + 5 )
                 i_pcr = GetPCR( p_pkt );
 
+            /* Designated PCR pid will be valid, don't repick (on the fly 
probing) */
+            if( i_pcr != -1 && !p_pid->probed.i_pcr_count )
+                p_pid->probed.i_pcr_count++;
+
             if( i_pcr == -1 &&
                 (p_pkt->p_buffer[1] & 0xC0) == 0x40 && /* payload start */
                 (p_pkt->p_buffer[3] & 0xD0) == 0x10 && /* Has payload but is 
not encrypted */

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to