This silence a few warnings and matches more closely av_image_*: - avpicture_fill() reads a const pointer - avpicture_layout() uses uint8_t instead of unsigned char
Signed-off-by: Vittorio Giovara <[email protected]> --- adding const qualifier to function parameters should be fine, is changing types during ABI break allowed too? I could split this and think of something else otherwise. Vittorio libavcodec/avcodec.h | 5 ++--- libavcodec/avpicture.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 11ae1fc..50350d5 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -4154,7 +4154,7 @@ void avpicture_free(AVPicture *picture); * * @see av_image_fill_arrays(). */ -int avpicture_fill(AVPicture *picture, uint8_t *ptr, +int avpicture_fill(AVPicture *picture, const uint8_t *ptr, enum AVPixelFormat pix_fmt, int width, int height); /** @@ -4164,8 +4164,7 @@ int avpicture_fill(AVPicture *picture, uint8_t *ptr, * @see av_image_copy_to_buffer(). */ int avpicture_layout(const AVPicture* src, enum AVPixelFormat pix_fmt, - int width, int height, - unsigned char *dest, int dest_size); + int width, int height, uint8_t *dest, int dest_size); /** * Calculate the size in bytes that a picture of the given width and height diff --git a/libavcodec/avpicture.c b/libavcodec/avpicture.c index 6bde0f8..d3ae5e8 100644 --- a/libavcodec/avpicture.c +++ b/libavcodec/avpicture.c @@ -31,7 +31,7 @@ #include "libavutil/imgutils.h" #include "libavutil/colorspace.h" -int avpicture_fill(AVPicture *picture, uint8_t *ptr, +int avpicture_fill(AVPicture *picture, const uint8_t *ptr, enum AVPixelFormat pix_fmt, int width, int height) { return av_image_fill_arrays(picture->data, picture->linesize, @@ -39,8 +39,7 @@ int avpicture_fill(AVPicture *picture, uint8_t *ptr, } int avpicture_layout(const AVPicture* src, enum AVPixelFormat pix_fmt, - int width, int height, - unsigned char *dest, int dest_size) + int width, int height, uint8_t *dest, int dest_size) { return av_image_copy_to_buffer(dest, dest_size, src->data, src->linesize, -- 1.9.5 (Apple Git-50.3) _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
