[MPlayer-dev-eng] Too big buffer in "libmpcodecs/ad_pcm.c"?
Uoti Urpala
uoti.urpala at pp1.inet.fi
Wed Aug 9 13:30:58 CEST 2006
On Wed, 2006-08-09 at 13:13 +0200, Reimar Doeffinger wrote:
> hello,
> On Wed, Aug 09, 2006 at 11:32:13AM +0200, Branimir Amidzic wrote:
> > So, my question is: *is it safe to use smaller buffer?*
>
> Yes.
>
> > For example minimum possible: len = ((minlen + len) / len) * len.
>
> But this is not safe, since then len can be > maxlen.
> But as you said you problem is that maxlen is too large, so why not fix
> that instead?
I think it would make sense to base the amount to decode on minlen and
only have an explicit sanity check based on maxlen. Using minlen as the
amount to decode is generally better; maxlen is just set to the maximum
buffer space and might require demuxing the file unnecessarily far
ahead.
More information about the MPlayer-dev-eng
mailing list