[FFmpeg-devel] Audio decoding in api-example.c broken?
Tue May 25 10:46:35 CEST 2010
On Mon, 24 May 2010, Michael Niedermayer wrote:
> On Mon, May 24, 2010 at 05:19:40PM +0300, Martin Storsj? wrote:
> > On Mon, 24 May 2010, Michael Niedermayer wrote:
> > > On Mon, May 24, 2010 at 03:46:08PM +0300, Martin Storsj? wrote:
> > > > That's why I always refilled the buffer in the previous suggestion.
> > >
> > > its quite inefficient if you have a 4096 buffer and 40 byte packets
> > > and as this is example code such hacks are obviously something we cant
> > > do
> > >
> > > you could allocate a 100k buffer and keep filling it so there is at least
> > > 4k there, and once you hit the end memmove the <=4k left to the begin
> > > this still is a hack without us knowing for sure 4k is enough in the
> > > first place but its better than what we have now
> > In this particular case, the data it decodes is just 41 KB so that part of
> > the code would never be used. But if you'd accept such a version of the
> > example anyway, I can try to rewrite it in that way.
> uhm, then make it 20k istead of 100k otherise its dead code which tends to
Updated suggestion attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2561 bytes
More information about the ffmpeg-devel