diff mbox series

[FFmpeg-devel,5/8] avdevice/lavfi: Make array static const

Message ID AM7PR03MB6660CB5F4A641E50AE28AAFD8F699@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 60a2c74a5eaf8d4ab16a68842be3b9cfbd45b467
Headers show
Series [FFmpeg-devel,1/2] avdevice/lavfi: Properly free an AVDictionary | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Dec. 2, 2021, 8:24 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavdevice/lavfi.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index 878bb193af..b208b1a928 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -269,11 +269,10 @@  av_cold static int lavfi_read_header(AVFormatContext *avctx)
             if (ret < 0)
                 goto end;
         } else if (type == AVMEDIA_TYPE_AUDIO) {
-            enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_U8,
-                                                  AV_SAMPLE_FMT_S16,
-                                                  AV_SAMPLE_FMT_S32,
-                                                  AV_SAMPLE_FMT_FLT,
-                                                  AV_SAMPLE_FMT_DBL, -1 };
+            static const enum AVSampleFormat sample_fmts[] = {
+                AV_SAMPLE_FMT_U8,  AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32,
+                AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_DBL, -1
+            };
 
             ret = avfilter_graph_create_filter(&sink, abuffersink,
                                                inout->name, NULL,