[vlc-devel] MPEGTS: audio stops after PCR jump

Kristof Vandenbussche kristof at tecnova.be
Tue Jun 21 08:35:11 UTC 2022


Hi All,

I am looking for a solution to the problem as mentioned in <https://code.videolan.org/videolan/vlc/-/issues/26768>.
(vlc-3.0.17)
I am focussing on why the audio stream stops playing as soon as there is a (huge) jump in the PCR, because video keeps playing.

What I see is that the problem is that the PTS from the mpeg audio stream does not get updated when a jump in the PCR happens, and still uses the old base value, causing packages to be discarded

>>[00007fbfc405ebf0] main decoder debug: discarded audio buffer


The problem is that the code in ClockStreamToSystem starts returning negative times.
this is because cl->ref.i_stream > i_stream.

The cl->ref.i_stream was correctly updated on a PTS gap (clock reset), but apparently the audio stream's clock is still the old one (and does not correct after a few packages)

I have verified that the PTS of the MPEGTS demuxer tags the packets with the correct pts/dts, and I also see the same timestamps being used by the MPEG packetizer.
However, the MPEG decoder still seems to get the buffers with the old base clock.

The problem is that I don't know what could be still in between. A stream filter? Or am I overlooking something?
Any help appreciated.

Best Regards,


Kristof Vandenbussche

GPG fingerprint: 19F6 0638 A33B 563D ED71 F07F E5AE 2082 E07D 9A38



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20220621/7b72d34f/attachment.html>


More information about the vlc-devel mailing list