[FFmpeg-cvslog] Make PIX_FMT format list arrays const.

Reimar Döffinger git at videolan.org
Sat Nov 5 15:45:27 CET 2011


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Sat Nov  5 15:20:18 2011 +0100| [d7e95ccd9ff3e55e194582a105421fa308a83ef1] | committer: Reimar Döffinger

Make PIX_FMT format list arrays const.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d7e95ccd9ff3e55e194582a105421fa308a83ef1
---

 libavfilter/vf_lut.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c
index a7f2f7b..ff5bfd1 100644
--- a/libavfilter/vf_lut.c
+++ b/libavfilter/vf_lut.c
@@ -141,16 +141,16 @@ static av_cold void uninit(AVFilterContext *ctx)
     PIX_FMT_ABGR,         PIX_FMT_BGRA,         \
     PIX_FMT_RGB24,        PIX_FMT_BGR24
 
-static enum PixelFormat yuv_pix_fmts[] = { YUV_FORMATS, PIX_FMT_NONE };
-static enum PixelFormat rgb_pix_fmts[] = { RGB_FORMATS, PIX_FMT_NONE };
-static enum PixelFormat all_pix_fmts[] = { RGB_FORMATS, YUV_FORMATS, PIX_FMT_NONE };
+static const enum PixelFormat yuv_pix_fmts[] = { YUV_FORMATS, PIX_FMT_NONE };
+static const enum PixelFormat rgb_pix_fmts[] = { RGB_FORMATS, PIX_FMT_NONE };
+static const enum PixelFormat all_pix_fmts[] = { RGB_FORMATS, YUV_FORMATS, PIX_FMT_NONE };
 
 static int query_formats(AVFilterContext *ctx)
 {
     LutContext *lut = ctx->priv;
 
-    enum PixelFormat *pix_fmts = lut->is_rgb ? rgb_pix_fmts :
-                                 lut->is_yuv ? yuv_pix_fmts : all_pix_fmts;
+    const enum PixelFormat *pix_fmts = lut->is_rgb ? rgb_pix_fmts :
+                                       lut->is_yuv ? yuv_pix_fmts : all_pix_fmts;
 
     avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts));
     return 0;



More information about the ffmpeg-cvslog mailing list