iptv-mpegts : Audio stops after a few hours due to PCR overflow
as posted on https://forum.videolan.org/viewtopic.php?f=2&t=159507
We are investigating an issue where, after watching the same IPTV channel for several hours, the audio playback stops. Video continues. We believe that it is the PCR counter that overflows, to trigger this problem. In the code we think the problem has been solved to some extent in TimeStampWrapAround (in modules/demux/mpeg/timestamps.h), but after a period of time (0x1FFFFFFFF at 90 kHz) the PCR will wrap after 26.5h.
if( i_first_pcr > 0x0FFFFFFFF && i_time < 0x0FFFFFFFF ) i_adjust = 0x1FFFFFFFF;
However, given the fact that this value is only 33 bits wide, the int64_t that holds it, should be large enough to count the overflows and have a PCR that never wraps. I have tried this approach, but then I got errors that ffmpeg was unable to decode the timestamp in the decoding chain later on.
I have yet to investigate this issue, but I was wondering whether somebody here could give me some hints/feedback on this issue