diff mbox series

[FFmpeg-devel,2/6] avfilter/avf_showcqt: Mark arrays as static const

Message ID 20200808140202.586-2-andreas.rheinhardt@gmail.com
State Accepted
Commit 2e0cf4de01ed062fc7862c821c21bb578dd4c5f8
Headers show
Series [FFmpeg-devel,1/6] avfilter/formats: Remove ff_make_formatu64_list()
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Aug. 8, 2020, 2:01 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavfilter/avf_showcqt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Paul B Mahol Aug. 8, 2020, 2:45 p.m. UTC | #1
On 8/8/20, Andreas Rheinhardt <andreas.rheinhardt@gmail.com> wrote:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavfilter/avf_showcqt.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c
> index cb0dca505f..990db3143b 100644
> --- a/libavfilter/avf_showcqt.c
> +++ b/libavfilter/avf_showcqt.c
> @@ -1321,12 +1321,12 @@ static int query_formats(AVFilterContext *ctx)
>      AVFilterChannelLayouts *layouts = NULL;
>      AVFilterLink *inlink = ctx->inputs[0];
>      AVFilterLink *outlink = ctx->outputs[0];
> -    enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_FLT,
> AV_SAMPLE_FMT_NONE };
> -    enum AVPixelFormat pix_fmts[] = {
> +    static const enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_FLT,
> AV_SAMPLE_FMT_NONE };
> +    static const enum AVPixelFormat pix_fmts[] = {
>          AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P,
>          AV_PIX_FMT_YUV444P, AV_PIX_FMT_RGB24, AV_PIX_FMT_NONE
>      };
> -    int64_t channel_layouts[] = { AV_CH_LAYOUT_STEREO,
> AV_CH_LAYOUT_STEREO_DOWNMIX, -1 };
> +    static const int64_t channel_layouts[] = { AV_CH_LAYOUT_STEREO,
> AV_CH_LAYOUT_STEREO_DOWNMIX, -1 };
>      int ret;
>
>      /* set input audio formats */
> --
> 2.20.1
>

LGTM

> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox series

Patch

diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c
index cb0dca505f..990db3143b 100644
--- a/libavfilter/avf_showcqt.c
+++ b/libavfilter/avf_showcqt.c
@@ -1321,12 +1321,12 @@  static int query_formats(AVFilterContext *ctx)
     AVFilterChannelLayouts *layouts = NULL;
     AVFilterLink *inlink = ctx->inputs[0];
     AVFilterLink *outlink = ctx->outputs[0];
-    enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_NONE };
-    enum AVPixelFormat pix_fmts[] = {
+    static const enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_NONE };
+    static const enum AVPixelFormat pix_fmts[] = {
         AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P,
         AV_PIX_FMT_YUV444P, AV_PIX_FMT_RGB24, AV_PIX_FMT_NONE
     };
-    int64_t channel_layouts[] = { AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_STEREO_DOWNMIX, -1 };
+    static const int64_t channel_layouts[] = { AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_STEREO_DOWNMIX, -1 };
     int ret;
 
     /* set input audio formats */