[FFmpeg-devel] [PATCH 2/3] lavd/utils: always look at file extension when probing
Reimar Döffinger
Reimar.Doeffinger
Sat Nov 13 11:38:16 CET 2010
On Sat, Nov 13, 2010 at 11:36:03AM +0100, Reimar D?ffinger wrote:
> On Sat, Nov 13, 2010 at 11:22:41AM +0100, Anton Khirnov wrote:
> > On Sat, Nov 13, 2010 at 11:00:14AM +0100, Anton Khirnov wrote:
> > > > > Anyway, if you're dead set against using file extensions, why are they
> > > > > even there?
> > > >
> > > > They're useful information, but your implementation gives them almost
> > > > the same priority as the probe function itself, that is not appropriate.
> > > I merely copied the number that was already there.
> > > Would the attached patch be more acceptable then? An extension adds 25%
> > > to the score, up to 50% max.
> > >
> > ok, let's pretend i didn't send that :)
>
> Which addresses neither of my comments, it still can increase the
> score above MAX/4 and it might trigger the condition
> if (score == *score_max)
> fmt = NULL;
> And honestly it may trigger
> if (score > *score_max)
> as well.
> One of those alone IMO is reason enough for rejection.
> I guess you possibly could add a
> if (!fmt && *score_max == 0) {
> fmt = av_guess_format(...);
> if (fmt)
> *score_max = 1;
> }
I don't think that's ok either, it violates the condition that
as probe size increases the score should either converge towards
MAX or towards 0.
So there needs to be at least a check that the probe size is not
much larger than the ID3 tag size in addition.
More information about the ffmpeg-devel
mailing list