summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-02-16 14:35:47 +0200
committerLuca Barbato <lu_zero@gentoo.org>2011-02-17 00:37:00 +0100
commit2c35a6bde95a382e2d48570255deb67a7633fa46 (patch)
tree9c3728797839bdbe9189acd581afc96103c423b8 /libavformat/rtsp.c
parent6741f7c9be4913e084ad067571f3f29853ec5d5a (diff)
downloadffmpeg-2c35a6bde95a382e2d48570255deb67a7633fa46.tar.gz
rtsp: udp_read_packet returning 0 doesn't mean success
If udp_read_packet returns 0, rtsp_st isn't set and we shouldn't treat it as a successfully received packet (which is counted and possibly triggers a RTCP receiver report). This fixes issue 2612.
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 41427ae08e..d828c8d09b 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1681,7 +1681,7 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt)
case RTSP_LOWER_TRANSPORT_UDP:
case RTSP_LOWER_TRANSPORT_UDP_MULTICAST:
len = udp_read_packet(s, &rtsp_st, rt->recvbuf, RECVBUF_SIZE, wait_end);
- if (len >=0 && rtsp_st->transport_priv && rt->transport == RTSP_TRANSPORT_RTP)
+ if (len > 0 && rtsp_st->transport_priv && rt->transport == RTSP_TRANSPORT_RTP)
rtp_check_and_send_back_rr(rtsp_st->transport_priv, len);
break;
}