[Ffmpeg-devel] [PATCH] read multiple frames in ac3_probe

Justin Ruggles justinruggles
Sun Mar 18 20:33:38 CET 2007


Michael Niedermayer wrote:
> Hi
> 
> On Sun, Mar 18, 2007 at 09:55:48AM -0500, Justin Ruggles wrote:
> [...]
> 
>>>>>>   }
>>>>>>-
>>>>>>-    return score;
>>>>>>+    if   (first_frames>=3) return AVPROBE_SCORE_MAX * 3 / 4;
>>>>>
>>>>>
>>>>>>+    else if(max_frames>=3) return AVPROBE_SCORE_MAX / 2 + 10;
>>>>>
>>>>>
>>>>>theres a possible problem with this, mpeg-ps generally returns
>>>>>AVPROBE_SCORE_MAX/2+2
>>>>>this returns more and mpeg-ps can contain several ac3 frames with no
>>>>>intervening mpeg-ps headers ...
>>>>
>>>>OK.  I was having issues with a couple AC-3 files being misdetected as
>>>>MPEG-PS...but I'll go ahead and change it to AVPROBE_SCORE_MAX / 2.
>>>
>>>
>>>are these files available somewhere?
>>
>>I got one of them from mplayer samples:
>>
>>http://samples.mplayerhq.hu/A-codecs/AC3-samples/a52dec-streams/thx_2_0/stream
>>
>>But all the samples I have now are properly detected with the new
>>ac3_probe.  I was having issues when writing the original version when I
>>only set it to (AVPROBE_SCORE_MAX / 2) because a false positive on
>>MPEG-PS was giving a score 2 higher than the AC-3 score.
>>
>>So using (AVPROBE_SCORE_MAX / 2) will be fine.
>>
>>New patch attached.
> 
> 
> looks ok

Applied.




More information about the ffmpeg-devel mailing list