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

Michael Niedermayer michaelni at gmx.at
Fri Mar 28 17:38:32 CET 2014


On Thu, Mar 27, 2014 at 07:30:32PM +0100, wm4 wrote:
> On Thu, 27 Mar 2014 19:06:07 +0100
> Michael Niedermayer <michaelni at gmx.at> wrote:
> 
> > 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()
> 
> Why not add demuxers for each image format? It could work like all
> those raw codecs. Then the image pseudo-demuxer could use the
> libavformat API properly.

See the patchset i just posted

also note, my goal is to fix a regression not to do a redesign of
image2. So iam happy to work toward the direction of some redesign
if people want that but i wont do more of it than needed for fixing
the regression.
There are some things missing like that the new probe code is only
used for distinuishing which image2 format to use not to probe image2
itself. A patch improving that is very welcome of course ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- 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/20140328/8f68aad3/attachment.asc>


More information about the ffmpeg-devel mailing list