diff options
author | Clément Bœsch <u@pkh.me> | 2016-06-21 22:26:44 +0200 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2016-06-21 22:26:44 +0200 |
commit | 00e122bc0f2a4d867797f593770f9902f275b864 (patch) | |
tree | e23dbf94682f975c5eb8960ddd7b1758cef14b31 /libavformat/rtsp.c | |
parent | 4873952f886b718810e5ecf2ef26ca53173e9935 (diff) | |
parent | bc2a32969eb4db17677971def5ad5b936d9d1648 (diff) | |
download | ffmpeg-00e122bc0f2a4d867797f593770f9902f275b864.tar.gz |
Merge commit 'bc2a32969eb4db17677971def5ad5b936d9d1648'
* commit 'bc2a32969eb4db17677971def5ad5b936d9d1648':
rtsp: Parse SSRC attributes in the SDP
Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 6888a2b11a..6f0d2c567d 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -573,6 +573,10 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, s1->seen_fmtp = 1; av_strlcpy(s1->delayed_fmtp, buf, sizeof(s1->delayed_fmtp)); } + } else if (av_strstart(p, "ssrc:", &p) && s->nb_streams > 0) { + rtsp_st = rt->rtsp_streams[rt->nb_rtsp_streams - 1]; + get_word(buf1, sizeof(buf1), &p); + rtsp_st->ssrc = strtoll(buf1, NULL, 10); } else if (av_strstart(p, "range:", &p)) { int64_t start, end; @@ -831,6 +835,8 @@ int ff_rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st) if (!rtsp_st->transport_priv) { return AVERROR(ENOMEM); } else if (CONFIG_RTPDEC && rt->transport == RTSP_TRANSPORT_RTP) { + RTPDemuxContext *rtpctx = rtsp_st->transport_priv; + rtpctx->ssrc = rtsp_st->ssrc; if (rtsp_st->dynamic_handler) { ff_rtp_parse_set_dynamic_protocol(rtsp_st->transport_priv, rtsp_st->dynamic_protocol_context, |