[FFmpeg-devel] Patch to reduce compiler warnings in libavcodec/aac_adtstoasc_bsf.c

Paul Sterne make4ppc
Mon Jul 19 01:26:24 CEST 2010


What is supposed to be const about buf?  Not the pointer buf itself, but the
contents of what buf is pointed to?
If buf was to be copied to poutbuff, shouldn't it remain const?  If yes,
then poutbuf also needs to be const, and the routine should never need to
modify the contents of what is pointed to, whether by buf or by poutbuf.

On Sun, Jul 18, 2010 at 4:06 PM, Michael Niedermayer <michaelni at gmx.at>wrote:

> On Sun, Jul 18, 2010 at 03:24:21PM -0700, Paul Sterne wrote:
> > Patch to reduce compiler warnings in libavcodec/aac_adtstoasc_bsf.c
>
> [...]
> > Index: libavcodec/avcodec.h
> > ===================================================================
> > --- libavcodec/avcodec.h      (revision 24318)
> > +++ libavcodec/avcodec.h      (working copy)
> > @@ -3893,7 +3893,7 @@
> >      int priv_data_size;
> >      int (*filter)(AVBitStreamFilterContext *bsfc,
> >                    AVCodecContext *avctx, const char *args,
> > -                  uint8_t **poutbuf, int *poutbuf_size,
> > +                  const uint8_t **poutbuf, int *poutbuf_size,
> >                    const uint8_t *buf, int buf_size, int keyframe);
> >      void (*close)(AVBitStreamFilterContext *bsfc);
> >      struct AVBitStreamFilter *next;
>
> This change looks wrong
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iD8DBQFMQ4jbYR7HhwQLD6sRAmXHAJ9dATwCSmYqY6dLeGDef5dO2KvvTQCfSp09
> EHHXi40CCrxYcsMq9KOZi3w=
> =NFUV
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>



More information about the ffmpeg-devel mailing list