mpegts: Update the PSI/SI table only if the version change

Multimedia / Libav - John Högberg [ericsson.com] - 28 April 2015 14:09 UTC

If a PAT is finished while a PMT section filter is opened but not yet finished, the PMT section filter is closed and all the received data is discarded.

This is usually not an issue but some multiplexers (With very quick PAT/PMT repetition settings) consistently emit a PMT section start, then a PAT, and then the rest of the PMT, causing the aforementioned behavior to result in no PMT being finished.

In the most pathologic situation the stream information are lost and the probe fallback miscategorizes subtitles as mp3 audio.

Avoid the issue through eliminating redundant PSI/SI table updates by checking their version field, which is required by the standard to be incremented on every change no matter how minor.

CC: libav-stable@libav.org

82de8d7 mpegts: Update the PSI/SI table only if the version change
libavformat/mpegts.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Upstream: git.libav.org


  • Share