[FFmpeg-devel] [PATCH 2/2] avformat/mpegts: Skip over broken 0x80 headers

Mark Thompson sw at jkqxz.net
Sun Apr 24 12:27:32 CEST 2016

On 24/04/16 03:53, Michael Niedermayer wrote:
> 0x47 is expected to be at [0] but the affected files contain something
> else sometimes in its place that starts with 0x80 and is 12 bytes long
> it contains some counter or timestamp
> without the code above it will almost always work but if the counter
> contains a 0x47 in it resync can start at the wrong byte
> I dont know what created these kind of files, so even if iam not
> hit by a bus i think i am not too usefull here
> i was hoping a bit my patch would lead to someone recognizing this ...

Sounds like an RTP header.  (You can certainly imagine a very sucky RTP receiver not bothering to do anything with the headers and hoping it all works out.)

Is it a 16-bit counter in the third and fourth bytes, and a 32-bit timestamp in the fifth to eighth?  <https://tools.ietf.org/html/rfc3550#section-5>

(Alternatively, link me to the sample and I'll have a look at it.)

- Mark

More information about the ffmpeg-devel mailing list