summaryrefslogtreecommitdiffstats
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-09 11:48:14 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-09 11:48:14 +0100
commit34c1c08c665389daa190cb331e4d899da8dde57a (patch)
tree4102f99b0b4cc834d0b9b6ccaef586753ad9c0f0 /libavformat/rtsp.c
parent8c3ae9ee66a2fb094b188c994a18df9f3e69a283 (diff)
parent86d9181cf41edc3382bf2481f95a2fb321058689 (diff)
downloadffmpeg-streaming-34c1c08c665389daa190cb331e4d899da8dde57a.zip
ffmpeg-streaming-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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 9aae845..dcd5085 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. */
OpenPOWER on IntegriCloud