From 38155b47fd561ef6b30c471f2b5982177c1d5e39 Mon Sep 17 00:00:00 2001 From: Dylan Alex Simon Date: Tue, 13 Aug 2013 11:33:51 -0400 Subject: [PATCH] avcodec: add const qualifier to avcodec_find_best_pix_fmt2 args avcodec_find_best_pix_fmt2 does not modify its first argument so may be marked const. This avoids a warning when passing in AVCodec.pix_fmts. Signed-off-by: Dylan Simon Signed-off-by: Michael Niedermayer --- libavcodec/avcodec.h | 2 +- libavcodec/imgconvert.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 4ba0d6b2dd..23fba4fb6d 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -4608,7 +4608,7 @@ enum AVPixelFormat avcodec_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt attribute_deprecated #if AV_HAVE_INCOMPATIBLE_LIBAV_ABI -enum AVPixelFormat avcodec_find_best_pix_fmt2(enum AVPixelFormat *pix_fmt_list, +enum AVPixelFormat avcodec_find_best_pix_fmt2(const enum AVPixelFormat *pix_fmt_list, enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr); #else diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index 42c75a55ba..d9dc55d325 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -248,7 +248,7 @@ enum AVPixelFormat avcodec_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt } #if AV_HAVE_INCOMPATIBLE_LIBAV_ABI -enum AVPixelFormat avcodec_find_best_pix_fmt2(enum AVPixelFormat *pix_fmt_list, +enum AVPixelFormat avcodec_find_best_pix_fmt2(const enum AVPixelFormat *pix_fmt_list, enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr){ return avcodec_find_best_pix_fmt_of_list(pix_fmt_list, src_pix_fmt, has_alpha, loss_ptr);