[FFmpeg-devel] [PATCH] add const to pix_fmt_lists in find_best

Michael Niedermayer michaelni at gmx.at
Wed Sep 11 16:56:51 CEST 2013

On Tue, Aug 13, 2013 at 11:33:51AM -0400, Dylan Alex Simon wrote:
> Passing AVCodec.pix_fmts to avcodec_find_best_pix_fmt_of_list results in a
> warning of non-constness.  This patch adds const to the argument to avoid this
> warning.  (If this is not something I should be doing in the first place, let
> me know.)  Patch is attached and also available in github.com/dylex/FFmpeg.

>  avcodec.h    |    4 ++--
>  imgconvert.c |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 8631cac483e380296f33405c2b9faf7075007ea0  0001-avcodec-add-const-qualifier-to-pix_fmt_list-args.patch
> From 28c83806e3dad6325ccaf8c4f18b4fdeb7a93524 Mon Sep 17 00:00:00 2001
> From: Dylan Simon <dylan at dylex.net>
> Date: Tue, 13 Aug 2013 11:12:10 -0400
> Subject: [PATCH] avcodec: add const qualifier to pix_fmt_list args
> avcodec_find_best_pix_fmt_of_list does not modify its first argument so may be
> marked const.  This avoids a warning when passing in AVCodec.pix_fmts.




Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130911/22e0f624/attachment.asc>

More information about the ffmpeg-devel mailing list