summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2008-11-15 14:44:48 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2008-11-15 14:44:48 +0000
commit6ff1f6153022821252de615858a6adf0b193eec0 (patch)
tree554c9ec25502c1ac2954fb6d7179dc317655ae12 /libavformat/rtsp.c
parent70f42303e7a20aa3e9c9de4837732b29d1c0a06f (diff)
Call check_back_and_send_rr() function only in case of RTP as a transport.
Don't call it for RDT, since it is unneeded and it doesn't provide a RTPDemuxContext, leading to some memory errors. See "[PATCH] fix small memory error in rtsp.c" thread on ML. Originally committed as revision 15828 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index f7596d2a34..543032e35c 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1399,7 +1399,7 @@ static int rtsp_read_packet(AVFormatContext *s,
case RTSP_LOWER_TRANSPORT_UDP:
case RTSP_LOWER_TRANSPORT_UDP_MULTICAST:
len = udp_read_packet(s, &rtsp_st, buf, sizeof(buf));
- if (len >=0 && rtsp_st->tx_ctx)
+ if (len >=0 && rtsp_st->tx_ctx && rt->transport == RTSP_TRANSPORT_RTP)
rtp_check_and_send_back_rr(rtsp_st->tx_ctx, len);
break;
}