On 2014-03-11 16:09:21 +0200, Martin Storsjö wrote: > For live audio streams, requiring 500 frames for a stream to > be detected is a bit overkill. > > This allows live ADTS streams that aren't frame-aligned > to start up more quickly, e.g. > http://mp3.streampower.be/radio1.aac. > --- > Since the probe buffer size is increased until a good enough > probe result is found, I'm not sure how much the previous > patch actually helps though. If a false positive stream e.g. has > got 200 matching frames but show mismatches after that, chances > are that we will first try with a small buffer finding e.g. 70 > matching frames, which isn't enough. Next we double the probe > buffer size and find 140 matching frames, which we deem enough - > even if we would have realized that it's a mismatch if we would > have tried with an ever bigger probe buffer, which we won't since > we now regard 100 as enough.
I don't think that it will be a problem. What valid file would have 100 or more consectutive adts frames and then something else. I can only think of diskimages containing adts files. > --- > libavformat/aacdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/aacdec.c b/libavformat/aacdec.c > index 3aee82b..be213d4 100644 > --- a/libavformat/aacdec.c > +++ b/libavformat/aacdec.c > @@ -65,7 +65,7 @@ static int adts_aac_probe(AVProbeData *p) > > if (first_frames >= 3) > return AVPROBE_SCORE_EXTENSION + 1; > - else if (max_frames > 500) > + else if (max_frames > 100) 100 still seems very safe, maybe add a comment that it is just a random number. > return AVPROBE_SCORE_EXTENSION; > else if (max_frames >= 3) > return AVPROBE_SCORE_EXTENSION / 2; > -- ok Janne _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
