diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-12-30 13:39:09 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-01-24 11:28:53 +0100 |
commit | a6d741920f0ed1a73e664bd8705164526d814922 (patch) | |
tree | 5a57ac762ee3750783849e92f12dcf1a37b45e02 /libavformat | |
parent | 3567fab6e2a5d8a61aa4eff19431582ce48f3c44 (diff) | |
download | ffmpeg-a6d741920f0ed1a73e664bd8705164526d814922.tar.gz |
avformat/rtpdec: Constify RTPDynamicProtocolHandlers
Also constify the list of pointers to said RTPDynamicProtocolHandlers.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rdt.c | 2 | ||||
-rw-r--r-- | libavformat/rtpdec.c | 22 | ||||
-rw-r--r-- | libavformat/rtpdec_qt.c | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/libavformat/rdt.c b/libavformat/rdt.c index 60c36f09e6..e5824f6a48 100644 --- a/libavformat/rdt.c +++ b/libavformat/rdt.c @@ -554,7 +554,7 @@ rdt_close_context (PayloadContext *rdt) } #define RDT_HANDLER(n, s, t) \ -RTPDynamicProtocolHandler ff_rdt_ ## n ## _handler = { \ +const RTPDynamicProtocolHandler ff_rdt_ ## n ## _handler = { \ .enc_name = s, \ .codec_type = t, \ .codec_id = AV_CODEC_ID_NONE, \ diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index 51cf0fde07..f40c020c33 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -36,48 +36,48 @@ #define MIN_FEEDBACK_INTERVAL 200000 /* 200 ms in us */ -static RTPDynamicProtocolHandler l24_dynamic_handler = { +static const RTPDynamicProtocolHandler l24_dynamic_handler = { .enc_name = "L24", .codec_type = AVMEDIA_TYPE_AUDIO, .codec_id = AV_CODEC_ID_PCM_S24BE, }; -static RTPDynamicProtocolHandler gsm_dynamic_handler = { +static const RTPDynamicProtocolHandler gsm_dynamic_handler = { .enc_name = "GSM", .codec_type = AVMEDIA_TYPE_AUDIO, .codec_id = AV_CODEC_ID_GSM, }; -static RTPDynamicProtocolHandler realmedia_mp3_dynamic_handler = { +static const RTPDynamicProtocolHandler realmedia_mp3_dynamic_handler = { .enc_name = "X-MP3-draft-00", .codec_type = AVMEDIA_TYPE_AUDIO, .codec_id = AV_CODEC_ID_MP3ADU, }; -static RTPDynamicProtocolHandler speex_dynamic_handler = { +static const RTPDynamicProtocolHandler speex_dynamic_handler = { .enc_name = "speex", .codec_type = AVMEDIA_TYPE_AUDIO, .codec_id = AV_CODEC_ID_SPEEX, }; -static RTPDynamicProtocolHandler opus_dynamic_handler = { +static const RTPDynamicProtocolHandler opus_dynamic_handler = { .enc_name = "opus", .codec_type = AVMEDIA_TYPE_AUDIO, .codec_id = AV_CODEC_ID_OPUS, }; -static RTPDynamicProtocolHandler t140_dynamic_handler = { /* RFC 4103 */ +static const RTPDynamicProtocolHandler t140_dynamic_handler = { /* RFC 4103 */ .enc_name = "t140", .codec_type = AVMEDIA_TYPE_SUBTITLE, .codec_id = AV_CODEC_ID_TEXT, }; -extern RTPDynamicProtocolHandler ff_rdt_video_handler; -extern RTPDynamicProtocolHandler ff_rdt_audio_handler; -extern RTPDynamicProtocolHandler ff_rdt_live_video_handler; -extern RTPDynamicProtocolHandler ff_rdt_live_audio_handler; +extern const RTPDynamicProtocolHandler ff_rdt_video_handler; +extern const RTPDynamicProtocolHandler ff_rdt_audio_handler; +extern const RTPDynamicProtocolHandler ff_rdt_live_video_handler; +extern const RTPDynamicProtocolHandler ff_rdt_live_audio_handler; -static const RTPDynamicProtocolHandler *rtp_dynamic_protocol_handler_list[] = { +static const RTPDynamicProtocolHandler *const rtp_dynamic_protocol_handler_list[] = { /* rtp */ &ff_ac3_dynamic_handler, &ff_amr_nb_dynamic_handler, diff --git a/libavformat/rtpdec_qt.c b/libavformat/rtpdec_qt.c index 740c382d07..93bf31746b 100644 --- a/libavformat/rtpdec_qt.c +++ b/libavformat/rtpdec_qt.c @@ -241,7 +241,7 @@ static void qt_rtp_close(PayloadContext *qt) } #define RTP_QT_HANDLER(m, n, s, t) \ -RTPDynamicProtocolHandler ff_ ## m ## _rtp_ ## n ## _handler = { \ +const RTPDynamicProtocolHandler ff_ ## m ## _rtp_ ## n ## _handler = { \ .enc_name = s, \ .codec_type = t, \ .codec_id = AV_CODEC_ID_NONE, \ |