[FFmpeg-devel] [PATCH] libgme support

Michael Niedermayer michaelni at gmx.at
Fri Jun 28 21:36:35 CEST 2013


On Fri, Jun 28, 2013 at 05:55:23PM +0200, wm4 wrote:
> On Fri, 28 Jun 2013 15:23:10 +0000 (UTC)
> Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> 
> > Carl Eugen Hoyos <cehoyos <at> ag.or.at> writes:
> > 
> > > > libgme checks the 4 bytes of the start of the file only. 
> > > > I'm returning AVPROBE_SCORE_MAX / 2 hoping to reduce 
> > > > potential breakage.
> > > 
> > > At least subtract one (or use AVPROBE_SCORE_MAX / 4 + 1)
> 
> Sounds good. I could add the file extension too. Actually I could add a
> check for the file extension too. So what should happen if the file
> extension is known to GME: just return AVPROBE_SCORE_EXTENSION? Or
> combine it somehow with the header check and improve the probe score if
> it matches? Or always require the file extension to match?
> 
> I see many possibilities, and the probe score is a bit arbitrary.

I think checking just the 4 bytes at data[0] should be fine in this
case.
We can always make it more complex if needed. (and if needed we
then also would know what the problem is we are fixing)
As is now, checking the file extension too could cause some files
to be not detected ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- 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/20130628/2f6da48f/attachment.asc>


More information about the ffmpeg-devel mailing list