[FFmpeg-devel] [PATCH] avformat/img2: add ff_guess_image2_codec2()

Michael Niedermayer michaelni at gmx.at
Thu Mar 27 19:06:07 CET 2014

On Thu, Mar 27, 2014 at 01:08:55PM +0100, wm4 wrote:
> On Thu, 27 Mar 2014 03:44:41 +0100
> Michael Niedermayer <michaelni at gmx.at> wrote:
> > Fixes brender detection
> > If more input formats need this, then the code should be moved into some
> > probe_codec() in each AVCodec or some img2 specific system of per codec
> > probe functions inside img2.
> > But this seems overkill for just 1 format needing it.
> Uh what? Proper detection of image file formats instead of by file
> extension is something libavformat always needed. You are adding a hack
> to a hack.

yes, that hack on a hack fixes a regression though.
try decoding brender with HEAD and ffmpeg 2.2

do you suggest that we should drop this hack on a hack patch and
design a proper probing API ?

in that case what exact API do you suggest ?

i could add a probe function to AVCodec and a
int(score) avcodec_probe(AVCodecProbeData *p)
AVCodecProbeData *avcodec_alloc_probedata(void)

and then use that from ff_guess_image2_codec2()

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140327/89c3a9f7/attachment.asc>

More information about the ffmpeg-devel mailing list