[FFmpeg-devel] [PATCH 89/90] avdevice: Constify all devices

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Mon Apr 19 21:09:05 EEST 2021


This is possible now that the next-API is gone.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavdevice/alldevices.c      | 66 +++++++++++++++++------------------
 libavdevice/alsa_dec.c        |  2 +-
 libavdevice/alsa_enc.c        |  2 +-
 libavdevice/android_camera.c  |  2 +-
 libavdevice/audiotoolbox.m    |  2 +-
 libavdevice/avfoundation.m    |  2 +-
 libavdevice/bktr.c            |  2 +-
 libavdevice/caca.c            |  2 +-
 libavdevice/decklink_dec_c.c  |  2 +-
 libavdevice/decklink_enc_c.c  |  2 +-
 libavdevice/dshow.c           |  2 +-
 libavdevice/fbdev_dec.c       |  2 +-
 libavdevice/fbdev_enc.c       |  2 +-
 libavdevice/gdigrab.c         |  2 +-
 libavdevice/iec61883.c        |  2 +-
 libavdevice/jack.c            |  2 +-
 libavdevice/kmsgrab.c         |  2 +-
 libavdevice/lavfi.c           |  2 +-
 libavdevice/libcdio.c         |  2 +-
 libavdevice/libdc1394.c       |  2 +-
 libavdevice/openal-dec.c      |  2 +-
 libavdevice/opengl_enc.c      |  2 +-
 libavdevice/oss_dec.c         |  2 +-
 libavdevice/oss_enc.c         |  2 +-
 libavdevice/pulse_audio_dec.c |  2 +-
 libavdevice/pulse_audio_enc.c |  2 +-
 libavdevice/sdl2.c            |  2 +-
 libavdevice/sndio_dec.c       |  2 +-
 libavdevice/sndio_enc.c       |  2 +-
 libavdevice/v4l2.c            |  2 +-
 libavdevice/v4l2enc.c         |  2 +-
 libavdevice/vfwcap.c          |  2 +-
 libavdevice/xcbgrab.c         |  2 +-
 libavdevice/xv.c              |  2 +-
 34 files changed, 66 insertions(+), 66 deletions(-)

diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c
index f65317018a..fbbe187a51 100644
--- a/libavdevice/alldevices.c
+++ b/libavdevice/alldevices.c
@@ -24,41 +24,41 @@
 #include "avdevice.h"
 
 /* devices */
-extern AVInputFormat  ff_alsa_demuxer;
-extern AVOutputFormat ff_alsa_muxer;
-extern AVInputFormat  ff_android_camera_demuxer;
-extern AVOutputFormat ff_audiotoolbox_muxer;
-extern AVInputFormat  ff_avfoundation_demuxer;
-extern AVInputFormat  ff_bktr_demuxer;
-extern AVOutputFormat ff_caca_muxer;
-extern AVInputFormat  ff_decklink_demuxer;
-extern AVOutputFormat ff_decklink_muxer;
-extern AVInputFormat  ff_dshow_demuxer;
-extern AVInputFormat  ff_fbdev_demuxer;
-extern AVOutputFormat ff_fbdev_muxer;
-extern AVInputFormat  ff_gdigrab_demuxer;
-extern AVInputFormat  ff_iec61883_demuxer;
-extern AVInputFormat  ff_jack_demuxer;
-extern AVInputFormat  ff_kmsgrab_demuxer;
-extern AVInputFormat  ff_lavfi_demuxer;
-extern AVInputFormat  ff_openal_demuxer;
-extern AVOutputFormat ff_opengl_muxer;
-extern AVInputFormat  ff_oss_demuxer;
-extern AVOutputFormat ff_oss_muxer;
-extern AVInputFormat  ff_pulse_demuxer;
-extern AVOutputFormat ff_pulse_muxer;
-extern AVOutputFormat ff_sdl2_muxer;
-extern AVInputFormat  ff_sndio_demuxer;
-extern AVOutputFormat ff_sndio_muxer;
-extern AVInputFormat  ff_v4l2_demuxer;
-extern AVOutputFormat ff_v4l2_muxer;
-extern AVInputFormat  ff_vfwcap_demuxer;
-extern AVInputFormat  ff_xcbgrab_demuxer;
-extern AVOutputFormat ff_xv_muxer;
+extern const AVInputFormat  ff_alsa_demuxer;
+extern const AVOutputFormat ff_alsa_muxer;
+extern const AVInputFormat  ff_android_camera_demuxer;
+extern const AVOutputFormat ff_audiotoolbox_muxer;
+extern const AVInputFormat  ff_avfoundation_demuxer;
+extern const AVInputFormat  ff_bktr_demuxer;
+extern const AVOutputFormat ff_caca_muxer;
+extern const AVInputFormat  ff_decklink_demuxer;
+extern const AVOutputFormat ff_decklink_muxer;
+extern const AVInputFormat  ff_dshow_demuxer;
+extern const AVInputFormat  ff_fbdev_demuxer;
+extern const AVOutputFormat ff_fbdev_muxer;
+extern const AVInputFormat  ff_gdigrab_demuxer;
+extern const AVInputFormat  ff_iec61883_demuxer;
+extern const AVInputFormat  ff_jack_demuxer;
+extern const AVInputFormat  ff_kmsgrab_demuxer;
+extern const AVInputFormat  ff_lavfi_demuxer;
+extern const AVInputFormat  ff_openal_demuxer;
+extern const AVOutputFormat ff_opengl_muxer;
+extern const AVInputFormat  ff_oss_demuxer;
+extern const AVOutputFormat ff_oss_muxer;
+extern const AVInputFormat  ff_pulse_demuxer;
+extern const AVOutputFormat ff_pulse_muxer;
+extern const AVOutputFormat ff_sdl2_muxer;
+extern const AVInputFormat  ff_sndio_demuxer;
+extern const AVOutputFormat ff_sndio_muxer;
+extern const AVInputFormat  ff_v4l2_demuxer;
+extern const AVOutputFormat ff_v4l2_muxer;
+extern const AVInputFormat  ff_vfwcap_demuxer;
+extern const AVInputFormat  ff_xcbgrab_demuxer;
+extern const AVOutputFormat ff_xv_muxer;
 
 /* external libraries */
-extern AVInputFormat  ff_libcdio_demuxer;
-extern AVInputFormat  ff_libdc1394_demuxer;
+extern const AVInputFormat  ff_libcdio_demuxer;
+extern const AVInputFormat  ff_libdc1394_demuxer;
 
 #include "libavdevice/outdev_list.c"
 #include "libavdevice/indev_list.c"
diff --git a/libavdevice/alsa_dec.c b/libavdevice/alsa_dec.c
index d8d4f3293b..e93f31b146 100644
--- a/libavdevice/alsa_dec.c
+++ b/libavdevice/alsa_dec.c
@@ -157,7 +157,7 @@ static const AVClass alsa_demuxer_class = {
     .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
 };
 
-AVInputFormat ff_alsa_demuxer = {
+const AVInputFormat ff_alsa_demuxer = {
     .name           = "alsa",
     .long_name      = NULL_IF_CONFIG_SMALL("ALSA audio input"),
     .priv_data_size = sizeof(AlsaData),
diff --git a/libavdevice/alsa_enc.c b/libavdevice/alsa_enc.c
index 1a6d01e3b1..a783d8eca1 100644
--- a/libavdevice/alsa_enc.c
+++ b/libavdevice/alsa_enc.c
@@ -157,7 +157,7 @@ static const AVClass alsa_muxer_class = {
     .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
 };
 
-AVOutputFormat ff_alsa_muxer = {
+const AVOutputFormat ff_alsa_muxer = {
     .name           = "alsa",
     .long_name      = NULL_IF_CONFIG_SMALL("ALSA audio output"),
     .priv_data_size = sizeof(AlsaData),
diff --git a/libavdevice/android_camera.c b/libavdevice/android_camera.c
index 4a956a7f52..f089d1b6f9 100644
--- a/libavdevice/android_camera.c
+++ b/libavdevice/android_camera.c
@@ -859,7 +859,7 @@ static const AVClass android_camera_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
-AVInputFormat ff_android_camera_demuxer = {
+const AVInputFormat ff_android_camera_demuxer = {
     .name           = "android_camera",
     .long_name      = NULL_IF_CONFIG_SMALL("Android camera input device"),
     .priv_data_size = sizeof(AndroidCameraCtx),
diff --git a/libavdevice/audiotoolbox.m b/libavdevice/audiotoolbox.m
index d8c8312a00..0cb97b5e46 100644
--- a/libavdevice/audiotoolbox.m
+++ b/libavdevice/audiotoolbox.m
@@ -294,7 +294,7 @@ static const AVClass at_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
 };
 
-AVOutputFormat ff_audiotoolbox_muxer = {
+const AVOutputFormat ff_audiotoolbox_muxer = {
     .name           = "audiotoolbox",
     .long_name      = NULL_IF_CONFIG_SMALL("AudioToolbox output device"),
     .priv_data_size = sizeof(ATContext),
diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
index 59d5b0af4f..bad3760159 100644
--- a/libavdevice/avfoundation.m
+++ b/libavdevice/avfoundation.m
@@ -1214,7 +1214,7 @@ static const AVClass avf_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
-AVInputFormat ff_avfoundation_demuxer = {
+const AVInputFormat ff_avfoundation_demuxer = {
     .name           = "avfoundation",
     .long_name      = NULL_IF_CONFIG_SMALL("AVFoundation input device"),
     .priv_data_size = sizeof(AVFContext),
diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c
index 0688028f90..e96c4a359e 100644
--- a/libavdevice/bktr.c
+++ b/libavdevice/bktr.c
@@ -348,7 +348,7 @@ static const AVClass bktr_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
-AVInputFormat ff_bktr_demuxer = {
+const AVInputFormat ff_bktr_demuxer = {
     .name           = "bktr",
     .long_name      = NULL_IF_CONFIG_SMALL("video grab"),
     .priv_data_size = sizeof(VideoData),
diff --git a/libavdevice/caca.c b/libavdevice/caca.c
index 726cfda95f..5e8d40a748 100644
--- a/libavdevice/caca.c
+++ b/libavdevice/caca.c
@@ -227,7 +227,7 @@ static const AVClass caca_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
 };
 
-AVOutputFormat ff_caca_muxer = {
+const AVOutputFormat ff_caca_muxer = {
     .name           = "caca",
     .long_name      = NULL_IF_CONFIG_SMALL("caca (color ASCII art) output device"),
     .priv_data_size = sizeof(CACAContext),
diff --git a/libavdevice/decklink_dec_c.c b/libavdevice/decklink_dec_c.c
index 07b1b39f74..1d93e8bab5 100644
--- a/libavdevice/decklink_dec_c.c
+++ b/libavdevice/decklink_dec_c.c
@@ -101,7 +101,7 @@ static const AVClass decklink_demuxer_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
-AVInputFormat ff_decklink_demuxer = {
+const AVInputFormat ff_decklink_demuxer = {
     .name           = "decklink",
     .long_name      = NULL_IF_CONFIG_SMALL("Blackmagic DeckLink input"),
     .flags          = AVFMT_NOFILE,
diff --git a/libavdevice/decklink_enc_c.c b/libavdevice/decklink_enc_c.c
index f09659909f..828cf5db65 100644
--- a/libavdevice/decklink_enc_c.c
+++ b/libavdevice/decklink_enc_c.c
@@ -48,7 +48,7 @@ static const AVClass decklink_muxer_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
 };
 
-AVOutputFormat ff_decklink_muxer = {
+const AVOutputFormat ff_decklink_muxer = {
     .name           = "decklink",
     .long_name      = NULL_IF_CONFIG_SMALL("Blackmagic DeckLink output"),
     .audio_codec    = AV_CODEC_ID_PCM_S16LE,
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 73a9a48b20..82097dfde2 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -1328,7 +1328,7 @@ static const AVClass dshow_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
-AVInputFormat ff_dshow_demuxer = {
+const AVInputFormat ff_dshow_demuxer = {
     .name           = "dshow",
     .long_name      = NULL_IF_CONFIG_SMALL("DirectShow capture"),
     .priv_data_size = sizeof(struct dshow_ctx),
diff --git a/libavdevice/fbdev_dec.c b/libavdevice/fbdev_dec.c
index 586caeef88..b73f31f1ef 100644
--- a/libavdevice/fbdev_dec.c
+++ b/libavdevice/fbdev_dec.c
@@ -232,7 +232,7 @@ static const AVClass fbdev_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
-AVInputFormat ff_fbdev_demuxer = {
+const AVInputFormat ff_fbdev_demuxer = {
     .name           = "fbdev",
     .long_name      = NULL_IF_CONFIG_SMALL("Linux framebuffer"),
     .priv_data_size = sizeof(FBDevContext),
diff --git a/libavdevice/fbdev_enc.c b/libavdevice/fbdev_enc.c
index 4191596825..e8d8d7b85b 100644
--- a/libavdevice/fbdev_enc.c
+++ b/libavdevice/fbdev_enc.c
@@ -205,7 +205,7 @@ static const AVClass fbdev_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
 };
 
-AVOutputFormat ff_fbdev_muxer = {
+const AVOutputFormat ff_fbdev_muxer = {
     .name           = "fbdev",
     .long_name      = NULL_IF_CONFIG_SMALL("Linux framebuffer"),
     .priv_data_size = sizeof(FBDevContext),
diff --git a/libavdevice/gdigrab.c b/libavdevice/gdigrab.c
index 7688370643..c069232472 100644
--- a/libavdevice/gdigrab.c
+++ b/libavdevice/gdigrab.c
@@ -664,7 +664,7 @@ static const AVClass gdigrab_class = {
 };
 
 /** gdi grabber device demuxer declaration */
-AVInputFormat ff_gdigrab_demuxer = {
+const AVInputFormat ff_gdigrab_demuxer = {
     .name           = "gdigrab",
     .long_name      = NULL_IF_CONFIG_SMALL("GDI API Windows frame grabber"),
     .priv_data_size = sizeof(struct gdigrab),
diff --git a/libavdevice/iec61883.c b/libavdevice/iec61883.c
index cafafb2672..e7b71c757a 100644
--- a/libavdevice/iec61883.c
+++ b/libavdevice/iec61883.c
@@ -499,7 +499,7 @@ static const AVClass iec61883_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
-AVInputFormat ff_iec61883_demuxer = {
+const AVInputFormat ff_iec61883_demuxer = {
     .name           = "iec61883",
     .long_name      = NULL_IF_CONFIG_SMALL("libiec61883 (new DV1394) A/V input device"),
     .priv_data_size = sizeof(struct iec61883_data),
diff --git a/libavdevice/jack.c b/libavdevice/jack.c
index 34f1c6de97..31534134f3 100644
--- a/libavdevice/jack.c
+++ b/libavdevice/jack.c
@@ -342,7 +342,7 @@ static const AVClass jack_indev_class = {
     .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
 };
 
-AVInputFormat ff_jack_demuxer = {
+const AVInputFormat ff_jack_demuxer = {
     .name           = "jack",
     .long_name      = NULL_IF_CONFIG_SMALL("JACK Audio Connection Kit"),
     .priv_data_size = sizeof(JackData),
diff --git a/libavdevice/kmsgrab.c b/libavdevice/kmsgrab.c
index 6cc305b16f..ba9b306c65 100644
--- a/libavdevice/kmsgrab.c
+++ b/libavdevice/kmsgrab.c
@@ -708,7 +708,7 @@ static const AVClass kmsgrab_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
-AVInputFormat ff_kmsgrab_demuxer = {
+const AVInputFormat ff_kmsgrab_demuxer = {
     .name           = "kmsgrab",
     .long_name      = NULL_IF_CONFIG_SMALL("KMS screen capture"),
     .priv_data_size = sizeof(KMSGrabContext),
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index b26d8b739d..57d977e7ce 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -494,7 +494,7 @@ static const AVClass lavfi_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_INPUT,
 };
 
-AVInputFormat ff_lavfi_demuxer = {
+const AVInputFormat ff_lavfi_demuxer = {
     .name           = "lavfi",
     .long_name      = NULL_IF_CONFIG_SMALL("Libavfilter virtual input device"),
     .priv_data_size = sizeof(LavfiContext),
diff --git a/libavdevice/libcdio.c b/libavdevice/libcdio.c
index a4c9f52337..f1a1468554 100644
--- a/libavdevice/libcdio.c
+++ b/libavdevice/libcdio.c
@@ -182,7 +182,7 @@ static const AVClass libcdio_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
 };
 
-AVInputFormat ff_libcdio_demuxer = {
+const AVInputFormat ff_libcdio_demuxer = {
     .name           = "libcdio",
     .read_header    = read_header,
     .read_packet    = read_packet,
diff --git a/libavdevice/libdc1394.c b/libavdevice/libdc1394.c
index 003335fdd8..e98b88c1a2 100644
--- a/libavdevice/libdc1394.c
+++ b/libavdevice/libdc1394.c
@@ -288,7 +288,7 @@ static int dc1394_close(AVFormatContext * context)
     return 0;
 }
 
-AVInputFormat ff_libdc1394_demuxer = {
+const AVInputFormat ff_libdc1394_demuxer = {
     .name           = "libdc1394",
     .long_name      = NULL_IF_CONFIG_SMALL("dc1394 v.2 A/V grab"),
     .priv_data_size = sizeof(struct dc1394_data),
diff --git a/libavdevice/openal-dec.c b/libavdevice/openal-dec.c
index 57de665eb6..54f1203130 100644
--- a/libavdevice/openal-dec.c
+++ b/libavdevice/openal-dec.c
@@ -248,7 +248,7 @@ static const AVClass class = {
     .category = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
 };
 
-AVInputFormat ff_openal_demuxer = {
+const AVInputFormat ff_openal_demuxer = {
     .name = "openal",
     .long_name = NULL_IF_CONFIG_SMALL("OpenAL audio capture device"),
     .priv_data_size = sizeof(al_data),
diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
index 2bdb8da732..9302979f46 100644
--- a/libavdevice/opengl_enc.c
+++ b/libavdevice/opengl_enc.c
@@ -1292,7 +1292,7 @@ static const AVClass opengl_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
 };
 
-AVOutputFormat ff_opengl_muxer = {
+const AVOutputFormat ff_opengl_muxer = {
     .name           = "opengl",
     .long_name      = NULL_IF_CONFIG_SMALL("OpenGL output"),
     .priv_data_size = sizeof(OpenGLContext),
diff --git a/libavdevice/oss_dec.c b/libavdevice/oss_dec.c
index 13ace7000d..34efb6b184 100644
--- a/libavdevice/oss_dec.c
+++ b/libavdevice/oss_dec.c
@@ -132,7 +132,7 @@ static const AVClass oss_demuxer_class = {
     .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
 };
 
-AVInputFormat ff_oss_demuxer = {
+const AVInputFormat ff_oss_demuxer = {
     .name           = "oss",
     .long_name      = NULL_IF_CONFIG_SMALL("OSS (Open Sound System) capture"),
     .priv_data_size = sizeof(OSSAudioData),
diff --git a/libavdevice/oss_enc.c b/libavdevice/oss_enc.c
index 274c7601aa..6c1bc042c1 100644
--- a/libavdevice/oss_enc.c
+++ b/libavdevice/oss_enc.c
@@ -96,7 +96,7 @@ static const AVClass oss_muxer_class = {
     .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
 };
 
-AVOutputFormat ff_oss_muxer = {
+const AVOutputFormat ff_oss_muxer = {
     .name           = "oss",
     .long_name      = NULL_IF_CONFIG_SMALL("OSS (Open Sound System) playback"),
     .priv_data_size = sizeof(OSSAudioData),
diff --git a/libavdevice/pulse_audio_dec.c b/libavdevice/pulse_audio_dec.c
index 3777396ef6..b23d08e4d3 100644
--- a/libavdevice/pulse_audio_dec.c
+++ b/libavdevice/pulse_audio_dec.c
@@ -386,7 +386,7 @@ static const AVClass pulse_demuxer_class = {
     .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
 };
 
-AVInputFormat ff_pulse_demuxer = {
+const AVInputFormat ff_pulse_demuxer = {
     .name           = "pulse",
     .long_name      = NULL_IF_CONFIG_SMALL("Pulse audio input"),
     .priv_data_size = sizeof(PulseData),
diff --git a/libavdevice/pulse_audio_enc.c b/libavdevice/pulse_audio_enc.c
index e0a631b227..bfd7be4f37 100644
--- a/libavdevice/pulse_audio_enc.c
+++ b/libavdevice/pulse_audio_enc.c
@@ -778,7 +778,7 @@ static const AVClass pulse_muxer_class = {
     .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
 };
 
-AVOutputFormat ff_pulse_muxer = {
+const AVOutputFormat ff_pulse_muxer = {
     .name                 = "pulse",
     .long_name            = NULL_IF_CONFIG_SMALL("Pulse audio output"),
     .priv_data_size       = sizeof(PulseData),
diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c
index d6fc74a66c..a9023153f1 100644
--- a/libavdevice/sdl2.c
+++ b/libavdevice/sdl2.c
@@ -355,7 +355,7 @@ static const AVClass sdl2_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
 };
 
-AVOutputFormat ff_sdl2_muxer = {
+const AVOutputFormat ff_sdl2_muxer = {
     .name           = "sdl,sdl2",
     .long_name      = NULL_IF_CONFIG_SMALL("SDL2 output device"),
     .priv_data_size = sizeof(SDLContext),
diff --git a/libavdevice/sndio_dec.c b/libavdevice/sndio_dec.c
index ebb485a2c7..ec8fa4126a 100644
--- a/libavdevice/sndio_dec.c
+++ b/libavdevice/sndio_dec.c
@@ -109,7 +109,7 @@ static const AVClass sndio_demuxer_class = {
     .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
 };
 
-AVInputFormat ff_sndio_demuxer = {
+const AVInputFormat ff_sndio_demuxer = {
     .name           = "sndio",
     .long_name      = NULL_IF_CONFIG_SMALL("sndio audio capture"),
     .priv_data_size = sizeof(SndioData),
diff --git a/libavdevice/sndio_enc.c b/libavdevice/sndio_enc.c
index f6dd290108..2e698d7c35 100644
--- a/libavdevice/sndio_enc.c
+++ b/libavdevice/sndio_enc.c
@@ -86,7 +86,7 @@ static const AVClass sndio_muxer_class = {
     .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
 };
 
-AVOutputFormat ff_sndio_muxer = {
+const AVOutputFormat ff_sndio_muxer = {
     .name           = "sndio",
     .long_name      = NULL_IF_CONFIG_SMALL("sndio audio playback"),
     .priv_data_size = sizeof(SndioData),
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index a5226d5e6f..a5149a9132 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -1117,7 +1117,7 @@ static const AVClass v4l2_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
-AVInputFormat ff_v4l2_demuxer = {
+const AVInputFormat ff_v4l2_demuxer = {
     .name           = "video4linux2,v4l2",
     .long_name      = NULL_IF_CONFIG_SMALL("Video4Linux2 device grab"),
     .priv_data_size = sizeof(struct video_data),
diff --git a/libavdevice/v4l2enc.c b/libavdevice/v4l2enc.c
index 6e5cb88491..787fe53547 100644
--- a/libavdevice/v4l2enc.c
+++ b/libavdevice/v4l2enc.c
@@ -109,7 +109,7 @@ static const AVClass v4l2_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
 };
 
-AVOutputFormat ff_v4l2_muxer = {
+const AVOutputFormat ff_v4l2_muxer = {
     .name           = "video4linux2,v4l2",
     .long_name      = NULL_IF_CONFIG_SMALL("Video4Linux2 output device"),
     .priv_data_size = sizeof(V4L2Context),
diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c
index b3ef5f3448..6fad466f8a 100644
--- a/libavdevice/vfwcap.c
+++ b/libavdevice/vfwcap.c
@@ -482,7 +482,7 @@ static const AVClass vfw_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT
 };
 
-AVInputFormat ff_vfwcap_demuxer = {
+const AVInputFormat ff_vfwcap_demuxer = {
     .name           = "vfwcap",
     .long_name      = NULL_IF_CONFIG_SMALL("VfW video capture"),
     .priv_data_size = sizeof(struct vfw_ctx),
diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c
index fbe89d472d..8164101c5e 100644
--- a/libavdevice/xcbgrab.c
+++ b/libavdevice/xcbgrab.c
@@ -900,7 +900,7 @@ static av_cold int xcbgrab_read_header(AVFormatContext *s)
     return 0;
 }
 
-AVInputFormat ff_xcbgrab_demuxer = {
+const AVInputFormat ff_xcbgrab_demuxer = {
     .name           = "x11grab",
     .long_name      = NULL_IF_CONFIG_SMALL("X11 screen capture, using XCB"),
     .priv_data_size = sizeof(XCBGrabContext),
diff --git a/libavdevice/xv.c b/libavdevice/xv.c
index 50dc4e0d04..24ba3179f6 100644
--- a/libavdevice/xv.c
+++ b/libavdevice/xv.c
@@ -376,7 +376,7 @@ static const AVClass xv_class = {
     .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
 };
 
-AVOutputFormat ff_xv_muxer = {
+const AVOutputFormat ff_xv_muxer = {
     .name           = "xv",
     .long_name      = NULL_IF_CONFIG_SMALL("XV (XVideo) output device"),
     .priv_data_size = sizeof(XVContext),
-- 
2.27.0



More information about the ffmpeg-devel mailing list