[Ffmpeg-cvslog] r5492 - in trunk/libavformat: aiff.c asf-enc.c avformat.h dv.c gif.c matroska.c movenc.c png.c utils.c yuv4mpeg.c

Oded Shimon ods15
Sat Jun 17 19:35:11 CEST 2006


On Sat, Jun 17, 2006 at 07:29:52PM +0200, Alex Beregszaszi wrote:
> Hi,
> 
> > --- trunk/libavformat/asf-enc.c	(original)
> > +++ trunk/libavformat/asf-enc.c	Sat Jun 17 17:53:23 2006
> > @@ -349,7 +349,7 @@
> >      /* stream headers */
> >      for(n=0;n<s->nb_streams;n++) {
> >          int64_t es_pos;
> > -        uint8_t *er_spr = NULL;
> > +        const uint8_t *er_spr = NULL;
> 
> Thans broken imho, er_spr will be set to something, thus it wont be
> constant anymore. Else defining a const variable just for holding NULL is even more nonsense.
> 
> >              if (enc->codec_id == CODEC_ID_ADPCM_G726) {
> > -                er_spr     = (uint8_t *)error_spread_ADPCM_G726;
> > +                er_spr     = error_spread_ADPCM_G726;
> >                  er_spr_len = sizeof(error_spread_ADPCM_G726);
> 
> Or do I understand the meaning of const in a bad way? 

pointer to const:

er_spr = bla;  // legal
*er_spt = bla; // illegal


what you're thinking of is 'uint8_t * const er_spr;', and is very rare...

- ods15




More information about the ffmpeg-cvslog mailing list