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

Michael Niedermayer michaelni
Sun Mar 18 18:46:28 CET 2007


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

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070318/c7f9b26a/attachment.pgp>



More information about the ffmpeg-devel mailing list