mirror of https://git.ffmpeg.org/ffmpeg.git
Make PIX_FMT format list arrays const.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
parent
8541422506
commit
d7e95ccd9f
|
@ -141,16 +141,16 @@ static av_cold void uninit(AVFilterContext *ctx)
|
||||||
PIX_FMT_ABGR, PIX_FMT_BGRA, \
|
PIX_FMT_ABGR, PIX_FMT_BGRA, \
|
||||||
PIX_FMT_RGB24, PIX_FMT_BGR24
|
PIX_FMT_RGB24, PIX_FMT_BGR24
|
||||||
|
|
||||||
static enum PixelFormat yuv_pix_fmts[] = { YUV_FORMATS, PIX_FMT_NONE };
|
static const enum PixelFormat yuv_pix_fmts[] = { YUV_FORMATS, PIX_FMT_NONE };
|
||||||
static enum PixelFormat rgb_pix_fmts[] = { RGB_FORMATS, PIX_FMT_NONE };
|
static const 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 all_pix_fmts[] = { RGB_FORMATS, YUV_FORMATS, PIX_FMT_NONE };
|
||||||
|
|
||||||
static int query_formats(AVFilterContext *ctx)
|
static int query_formats(AVFilterContext *ctx)
|
||||||
{
|
{
|
||||||
LutContext *lut = ctx->priv;
|
LutContext *lut = ctx->priv;
|
||||||
|
|
||||||
enum PixelFormat *pix_fmts = lut->is_rgb ? rgb_pix_fmts :
|
const enum PixelFormat *pix_fmts = lut->is_rgb ? rgb_pix_fmts :
|
||||||
lut->is_yuv ? yuv_pix_fmts : all_pix_fmts;
|
lut->is_yuv ? yuv_pix_fmts : all_pix_fmts;
|
||||||
|
|
||||||
avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts));
|
avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts));
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue