diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-09 11:48:14 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-09 11:48:14 +0100 |
commit | 34c1c08c665389daa190cb331e4d899da8dde57a (patch) | |
tree | 4102f99b0b4cc834d0b9b6ccaef586753ad9c0f0 /libavformat/rtsp.c | |
parent | 8c3ae9ee66a2fb094b188c994a18df9f3e69a283 (diff) | |
parent | 86d9181cf41edc3382bf2481f95a2fb321058689 (diff) | |
download | ffmpeg-34c1c08c665389daa190cb331e4d899da8dde57a.tar.gz |
Merge commit '86d9181cf41edc3382bf2481f95a2fb321058689'
* commit '86d9181cf41edc3382bf2481f95a2fb321058689':
rtpdec: Support sending RTCP feedback packets
Conflicts:
libavformat/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 9aae845b35..dcd5085310 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -380,6 +380,8 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, get_word(buf1, sizeof(buf1), &p); /* protocol */ if (!strcmp(buf1, "udp")) rt->transport = RTSP_TRANSPORT_RAW; + else if (strstr(buf1, "/AVPF") || strstr(buf1, "/SAVPF")) + rtsp_st->feedback = 1; /* XXX: handle list of formats */ get_word(buf1, sizeof(buf1), &p); /* format list */ @@ -1932,6 +1934,12 @@ redo: ret = ff_rdt_parse_packet(rtsp_st->transport_priv, pkt, &rt->recvbuf, len); } else if (rt->transport == RTSP_TRANSPORT_RTP) { ret = ff_rtp_parse_packet(rtsp_st->transport_priv, pkt, &rt->recvbuf, len); + if (rtsp_st->feedback) { + AVIOContext *pb = NULL; + if (rt->lower_transport == RTSP_LOWER_TRANSPORT_CUSTOM) + pb = s->pb; + ff_rtp_send_rtcp_feedback(rtsp_st->transport_priv, rtsp_st->rtp_handle, pb); + } if (ret < 0) { /* Either bad packet, or a RTCP packet. Check if the * first_rtcp_ntp_time field was initialized. */ |