[FFmpeg-devel] [PATCH] Recognize MJPEG at probing

Michael Niedermayer michaelni at gmx.at
Tue Jun 10 14:54:36 CEST 2014

On Tue, Jun 10, 2014 at 10:36:43AM +0300, Andrey Utkin wrote:
> 2014-06-10 1:25 GMT+03:00 Michael Niedermayer <michaelni at gmx.at>:
> > On Tue, Jun 10, 2014 at 12:44:54AM +0300, Andrey Utkin wrote:
> >> 2014-06-09 18:57 GMT+03:00 Michael Niedermayer <michaelni at gmx.at>:
> >> > fixed differently
> >>
> >> will test tomorrow
> >>
> >> > also if theres a bug in http which seems like there is, this should
> >> > be fixed as well
> >>
> >> I don't see plain HTTP driver bug here. Why do you think so?
> >
> > i extracted the data from the pcap file with wireshark and tried the
> > patch and it didnt detect it. It seemed wiresharks http code
> > removed the line as part of teh http headers
> > which hints towards either its or ffmpegs http code having a bug
> Maybe you have missed the point where the data which gets to AVPacket
> and AVProbeData starts? There's tricky thing that Content-Type:
> image/jpeg is actually inside of data stream and that is right.
> I have tested your commit and it works, although the warning it
> produces feels wrong
> [mjpeg @ 0x26c6560] Format mjpeg detected only with low score of 25,
> misdetection possible!
> While i think we have enough info to recognize JPEG stream 100% sure,
> as we have explicit Content-Type.

i think the test is quite fuzzy and nowhere near 100%, even
the mail with the patch might be recognized as mjpeg with some "luck"
so might encapsulating such a stream in a container, if the
"Content-Type" "junk" isnt removed

Ive added the content type check to so it can get a bit higher score
and also fixed some long startup delay issues (some might still remain
didnt investigate further as it seemed mostly reasonable now)


PS: memmem is not portable

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

What does censorship reveal? It reveals fear. -- Julian Assange
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140610/507b9da9/attachment.asc>

More information about the ffmpeg-devel mailing list