[vlc-devel] Glitching at start of MPEG2 streams

Alex Woods alex at packetship.com
Thu Mar 13 18:53:55 CET 2014

Hello list,

I'm looking into an issue that can be seen at the start of MPEG2
streams. The particular scenario that we are really noticing it is when
switching between SAP notified streams. VLC will show a nice clean frame
very soon after starting the stream then there is a little glitching
that looks like a tiny jump backwards in the stream and then the stream
will play cleanly.

I've tracked this to the point where I can see that the order of PTSes
in the picture frames being passed to DecoderPlayVideo() in
DecoderDecodeVideo() is like this:


These picture frames are the result of calling through to libav's MPEG2
decoder. In every instance I've looked at, it's always frame 3 (logically)
that appears at the start of the stream. The blocks being passed in to
the decoder all seem to be in good order and are not repeated. At this
point I'm unsure as to whether this an issue with how VLC uses libav, or
a problem in the MPEG2 decoder within libav itself. I'm seeing this
issue with VLC 2.1 and also the master 2.2 dev branch, with libav 0.8.10
and 0.9.11.

Does anyone have any insight into what the root issue here is, or any
pointers that might help me, please?



More information about the vlc-devel mailing list