[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

Måns Rullgård mru
Sat Jun 17 19:41:23 CEST 2006


Alex Beregszaszi <alex at fsn.hu> writes:

> 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.
>
> Or do I understand the meaning of const in a bad way? 

That's a pointer to a const, not a const pointer.

Some examples:

a variable: int a = 42;
a constant: const int c = 17;
a pointer to a constant: const int *pc = &c;
a constant pointer: int *const cp = &a;
a constant pointer to a constant: const int *const cpc = &c;

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-cvslog mailing list