[FFmpeg-devel] [PATCH] IFF demuxer and 8SVX decoder

Kostya kostya.shishkov
Thu Mar 27 05:50:14 CET 2008


On Thu, Mar 27, 2008 at 01:17:52AM +0000, Jai Menon wrote:
> On Wednesday 26 March 2008 16:35:10 Michael Niedermayer wrote:
> > On Wed, Mar 26, 2008 at 08:05:54PM +0000, Jai Menon wrote:
> > > +        esc->fib_acc += esc->table[d & 0x0f];
> > > +        av_clip_uint8(esc->fib_acc);
> > > +        *out_data++ = esc->fib_acc << 8;
> > > +        esc->fib_acc += esc->table[d >> 4];
> > > +        av_clip_uint8(esc->fib_acc);
> > > +        *out_data++ = esc->fib_acc << 8;
> >
> > you are not checking if the out_data buffer is large enough
> How exactly do i do that? i looked through a majority of decoders and none of 
> them seem to perform such a check.....but i may be missing something

I personally spent some time adding checks on output buffer size for them.
Look into libavcodec/dpcm.c and maybe change it to support your audio decoders
instead of separate file.
 
> > >
> > > +    uint32_t channels;
> >
> > could be a local var
> 
> I need this in the context because i use it to compute the audio frame count 
> in the read packet method
> 
> 
> Patch with other changes applied is attached.
> 
> Regards
> Jai Menon
> <realityman at gmx.net>




More information about the ffmpeg-devel mailing list