[FFmpeg-devel] [PATCH] [RFC] libavcodec/h264_mp4toannexb_bsf.c: Copy const data

Måns Rullgård mans
Mon Feb 16 16:50:52 CET 2009


Patrik Kullman <patrik at yes.nu> writes:

> Gets rid of warning:
> libavcodec/h264_mp4toannexb_bsf.c:61: warning: cast discards qualifiers
> from pointer target type
>
> If this patch is accepted, there are around 31 more const casts that can
> be fixed.
>
> Index: libavcodec/h264_mp4toannexb_bsf.c
> ===================================================================
> --- libavcodec/h264_mp4toannexb_bsf.c	(revision 17373)
> +++ libavcodec/h264_mp4toannexb_bsf.c	(working copy)
> @@ -58,7 +58,7 @@
>  
>      /* nothing to filter */
>      if (!avctx->extradata || avctx->extradata_size < 6) {
> -        *poutbuf = (uint8_t*) buf;
> +        memcpy(*poutbuf, buf, buf_size);

This looks very wrong.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list