[vlc-devel] [PATCH] ts: fix applying pcr offset in PCRCheckDTS()

Petri Hintukainen phintuka at gmail.com
Mon Feb 29 09:35:13 CET 2016


On su, 2016-02-28 at 20:56 +0100, Francois Cartegnie wrote:
> Le 27/02/2016 21:50, Petri Hintukainen a écrit :
> > Improve logging
> > ---
> >  modules/demux/mpeg/ts.c | 13 ++++++++++---
> >  1 file changed, 10 insertions(+), 3 deletions(-)
> >  
> > -        if ((i_dts > 0 && i_dts <= i_pcr) || (i_pts > 0 && i_pts
> > <= i_pcr)) {
> > +        if( i_dts > 0 && i_dts <= i_pcr ) {
> >              msg_Err( p_demux, "send queued data for pid %d: DTS
> > %"PRId64" >= PCR %"PRId64"\n", p_pid->i_pid, i_dts, i_pcr);
> >              ParsePESDataChain( p_demux, p_pid );
> > +        } else if( i_pts > 0 && i_pts <= i_pcr ) {
> > +            msg_Err( p_demux, "send queued data for pid %d: PTS
> > %"PRId64" >= PCR %"PRId64"\n", p_pid->i_pid, i_pts, i_pcr);
> > +            ParsePESDataChain( p_demux, p_pid );
> >          }
> >      }
> >  }
> > 
> 
> Sorry, but It seems that logging was a debugging left-off.

No, it's intentional.

This code can potentially break lot of streams. Logging makes it easier
to find and fix those.

This code path should not be triggered in "normal" streams. It is inten
ded to handle sparse video streams, where last video frame is left
hanging in the demuxer before next video frame starts.


- Petri


More information about the vlc-devel mailing list