[FFmpeg-devel] improved DV probe score patch BROKES detecting 1-frame DV
Baptiste Coudurier
baptiste.coudurier
Fri Sep 25 20:13:35 CEST 2009
On 09/25/2009 07:01 AM, Michael Niedermayer wrote:
> On Fri, Sep 25, 2009 at 03:15:24PM +0200, Reimar D?ffinger wrote:
>> On Fri, Sep 25, 2009 at 02:43:51PM +0200, Michael Niedermayer wrote:
>>> On Fri, Sep 25, 2009 at 02:18:41PM +0200, Reimar D?ffinger wrote:
>>>> E.g. this change makes it work:
>>>> Index: libavformat/mpeg.c
>>>> ===================================================================
>>>> --- libavformat/mpeg.c (revision 20013)
>>>> +++ libavformat/mpeg.c (working copy)
>>>> @@ -78,7 +78,7 @@
>>>>
>>>> //av_log(NULL, AV_LOG_ERROR, "%d %d %d %d %d len:%d\n", sys, priv1,
>>>> //pspack,vid, audio, p->buf_size);
>>>> if(sys>invalid&& sys*9<= pspack*10)
>>>> - return pspack> 2 ? AVPROBE_SCORE_MAX/2+2 : AVPROBE_SCORE_MAX/4; // +1 for .mpg
>>>> + return pspack> 2 ? AVPROBE_SCORE_MAX/2+2 : AVPROBE_SCORE_MAX/4-1; // +1 for .mpg
>>>
>>> i would prefer if the scores would not be decreased below 25 to workaround
>>> the inefficiency of the dv probe that we know how to improve.
>>
>> Sorry to be snarky but I would prefer for the MPEG probe function not to
>> grab the world for itself,
>
> maybe we should test how bad the various<=25 probes are with probetest and
> then consider to reassign scores based on that. If above really is that
> often causing false positives then i surely agree with reducing its score
We can surely continue complicating probing functions, however I believe
the whole approach should be improved
First taking file extension into account is the first thing to do IMHO.
It seems reasonable to assume that if filename matches and probe is
sufficiently high enough (this must be defined), this is the correct format.
Also testing all formats is really overkill IMHO, the format matching
the file extension should be tested first and if it matches, probing
should be ended.
--
Baptiste COUDURIER
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org
More information about the ffmpeg-devel
mailing list