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

Patrik Kullman patrik
Tue Feb 17 15:43:48 CET 2009


Trying yet again!

I never seem to recall if the ending to "If at first you don't succeed"
is "try again" or "stop, failure might be your thing", so here goes.

All calls to avpicture_fill() that I can find seem to use an
av_malloc()'d buffer, since avpicture_fill() will actually use that
buffer for the image data.

Thus, I copy the const buf into an av_malloc()'d picture_data buffer
which avpicture_fill() then gets to play with.

Removes warning:
libavcodec/rawdec.c: In function ?raw_decode?:
libavcodec/rawdec.c:125: warning: passing argument 2 of ?avpicture_fill?
discards qualifiers from pointer target type


Any better than previous attempts?





More information about the ffmpeg-devel mailing list