summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2018-02-10 02:54:42 +0100
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2018-02-11 20:03:33 +0100
commitdced1f6cdfe479965898bed3cb5219d2ddbb0ad9 (patch)
tree60a85705edf0fbb843a3fede4095c15d57e4e00d /libavformat/rtsp.c
parentf2318aee8ca8df1c84092f7d6691a2d0df02c474 (diff)
lavf/rtpdec: Constify several pointers.
Fixes two warnings: libavformat/rtpdec.c:155:20: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] libavformat/rtpdec.c:168:20: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index b3cfbb874f..ceb770a3a4 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -211,7 +211,7 @@ static int get_sockaddr(AVFormatContext *s,
}
#if CONFIG_RTPDEC
-static void init_rtp_handler(RTPDynamicProtocolHandler *handler,
+static void init_rtp_handler(const RTPDynamicProtocolHandler *handler,
RTSPStream *rtsp_st, AVStream *st)
{
AVCodecParameters *par = st ? st->codecpar : NULL;
@@ -271,7 +271,7 @@ static int sdp_parse_rtpmap(AVFormatContext *s,
}
if (par->codec_id == AV_CODEC_ID_NONE) {
- RTPDynamicProtocolHandler *handler =
+ const RTPDynamicProtocolHandler *handler =
ff_rtp_handler_find_by_name(buf, par->codec_type);
init_rtp_handler(handler, rtsp_st, st);
/* If no dynamic handler was found, check with the list of standard
@@ -495,7 +495,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
if (CONFIG_RTPDEC && !rt->ts)
rt->ts = avpriv_mpegts_parse_open(s);
} else {
- RTPDynamicProtocolHandler *handler;
+ const RTPDynamicProtocolHandler *handler;
handler = ff_rtp_handler_find_by_id(
rtsp_st->sdp_payload_type, AVMEDIA_TYPE_DATA);
init_rtp_handler(handler, rtsp_st, NULL);
@@ -513,7 +513,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
rtsp_st->stream_index = st->index;
st->codecpar->codec_type = codec_type;
if (rtsp_st->sdp_payload_type < RTP_PT_PRIVATE) {
- RTPDynamicProtocolHandler *handler;
+ const RTPDynamicProtocolHandler *handler;
/* if standard payload type, we can find the codec right now */
ff_rtp_get_codec_info(st->codecpar, rtsp_st->sdp_payload_type);
if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO &&