1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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.
(cherry picked from commit 2c35a6bde9)
This commit is contained in:
Martin Storsjö 2011-02-16 14:35:47 +02:00 committed by Michael Niedermayer
parent 34c340d49f
commit 09e22efc7e

View File

@ -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;
}