Diego Biurrun <[email protected]> writes:

> On Thu, Jul 07, 2011 at 12:34:47AM +0100, Måns Rullgård wrote:
>> Diego Biurrun <[email protected]> writes:
>> 
>> > libavcodec/libgsm.c:148: warning: passing argument 2 of ‘gsm_decode’ 
>> > discards qualifiers from pointer target type
>> > /usr/include/gsm/gsm.h:68: note: expected ‘gsm_byte *’ but argument is of 
>> > type ‘const uint8_t *’
>> >
>> > --- a/libavcodec/libgsm.c
>> > +++ b/libavcodec/libgsm.c
>> > @@ -139,7 +139,7 @@ AVCodec ff_libgsm_ms_encoder = {
>> >  static int libgsm_decode_frame(AVCodecContext *avctx,
>> >                                 void *data, int *data_size,
>> >                                 AVPacket *avpkt) {
>> > -    const uint8_t *buf = avpkt->data;
>> > +    uint8_t *buf = avpkt->data;
>> >      int buf_size = avpkt->size;
>> >      *data_size = 0; /* In case of error */
>> >      if(buf_size < avctx->block_align) return -1;
>> > -- 
>> 
>> Maybe something should rather have a const added instead.
>
> gsm_decode() is external API that we have no control over.

In that case it's OK, since AVPacket.data isn't const anyway.

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to