[FFmpeg-devel] [RFC]Support G.726 in Sun AU
Carl Eugen Hoyos
cehoyos at ag.or.at
Sat Nov 24 10:27:18 CET 2012
Paul B Mahol <onemda <at> gmail.com> writes:
> > @@ -36,6 +36,10 @@
> > /* if we don't know the size in advance */
> > #define AU_UNKNOWN_SIZE ((uint32_t)(~0))
> >
> > +typedef struct {
> > + int bps;
>
> You could use bits_per_coded_sample?
Yes, will change.
> > @@ -145,7 +162,9 @@ static int au_read_header
> > codec = ff_codec_get_id(codec_au_tags, id);
> >
> > - if (!(bps = av_get_bits_per_sample(codec))) {
> > + if (codec == AV_CODEC_ID_ADPCM_G726) {
> > + au->bps = (uint8_t []){4, 0, 3, 5}[id - 23];
>
> bps could become 0 in future causing division by 0 in later code.
Could you explain how it can become 0, I don't understand?
Thank you, Carl Eugen
More information about the ffmpeg-devel
mailing list