[Ffmpeg-cvslog] r5663 - in trunk: libavcodec/utils.c libavformat/voc.c

Aurelien Jacobs aurel
Sat Jul 8 09:14:24 CEST 2006


On Sat, 8 Jul 2006 03:02:31 +0200
Michael Niedermayer <michaelni at gmx.at> wrote:

> Hi
> 
> On Sat, Jul 08, 2006 at 01:20:45AM +0200, Aurelien Jacobs wrote:
> > On Sat, 8 Jul 2006 01:03:18 +0200
> > Michael Niedermayer <michaelni at gmx.at> wrote:
> > 
> > > Hi
> > > 
> > > On Sat, Jul 08, 2006 at 01:01:44AM +0200, Aurelien Jacobs wrote:
> > > > On Sat, 8 Jul 2006 00:42:41 +0200
> > > > Michael Niedermayer <michaelni at gmx.at> wrote:
> > > > 
> > > > > Hi
> > > > > 
> > > > > On Sat, Jul 08, 2006 at 12:42:36AM +0200, aurel wrote:
> > > > > [...]
> > > > > > +    case CODEC_ID_ADPCM_CT:
> > > > > > +    case CODEC_ID_ADPCM_SBPRO_2:
> > > > > > +    case CODEC_ID_ADPCM_SBPRO_3:
> > > > > > +    case CODEC_ID_ADPCM_SBPRO_4:
> > > > > > +        return 0;
> > > > > [...]
> > > > > > -    case CODEC_ID_ADPCM_CT:
> > > > > > -        return 4;
> > > > > [...]
> > > > > > -            dec->bits_per_sample = voc_get_bps(dec->codec_id);
> > > > > > +            dec->bits_per_sample = av_get_bits_per_sample(dec->codec_id);
> > > > > 
> > > > > interresting change ...
> > > > 
> > > > Well, setting bits_per_sample to anything >0 and <8 generate a divide by zero
> > > 
> > > bug, feel free to fix ...
> > 
> > Ok. Would this be acceptable ?
> > 
> > Aurel
> 
> [...]
> > -            frame_size = size / ((bits_per_sample >> 3) * enc->channels);
> > +            frame_size = (size / (bits_per_sample * enc->channels)) << 3;
> 
> why not (size << 3) / ... ?

fixed this way.

Aurel




More information about the ffmpeg-cvslog mailing list