[FFmpeg-devel] [PATCH] Lego Mindstorms RSO de/muxer (copied from au.c)

Rafaël Carré rafael.carre
Thu Jul 15 19:45:39 CEST 2010


On Thu, 15 Jul 2010 11:40:14 -0400
"Ronald S. Bultje" <rsbultje at gmail.com> wrote:

> Hi,
> 
> On Thu, Jul 15, 2010 at 10:44 AM, Rafa?l Carr?
> <rafael.carre at gmail.com> wrote:
> > Also added a probe function with Mike suggestion (details in the
> > patch commit log)
> [..]
> > +    rate = AV_RB16(&p->buf[4]);
> > +    if (rate < 3000 || rate > 16000)        /* XXX: find legal
> > sample rates */
> > +        return 0;
> 
> Certainly a rate of 4000, 8000 or 16000 is more likely to be an
> indicator of a valid file than 14867, 3175 or [etc], so I'm thinking
> giving higher probe return values for particular samplerate values
> makes sense.

Good idea,

I think something like:

	if (rate % 1000 == 0)
		return AVPROBE_SCORE_MAX / 2;
	else
		return AVPROBE_SCORE_MAX / 4;

to just match multiples of 1kHz, rather than having a list, because
3kHz doesn't particularly fits in a list of common samplerates.

-- 
? Rafa?l Carr? ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100715/3c64ad8f/attachment.pgp>



More information about the ffmpeg-devel mailing list