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

Michael Niedermayer michael at niedermayer.cc
Mon Apr 25 00:24:36 CEST 2016


On Sun, Apr 24, 2016 at 11:27:32AM +0100, Mark Thompson wrote:
> 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.)

http://samples.ffmpeg.org/ts/01c56b0dc1.ts

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160425/e4c7060c/attachment.sig>


More information about the ffmpeg-devel mailing list