summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 134b3223e4..b3e54442af 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1867,6 +1867,7 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt)
rt->cur_transport_priv = NULL;
}
+redo:
if (rt->transport == RTSP_TRANSPORT_RTP) {
int i;
int64_t first_queue_time = 0;
@@ -1882,12 +1883,15 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt)
first_queue_st = rt->rtsp_streams[i];
}
}
- if (first_queue_time)
+ if (first_queue_time) {
wait_end = first_queue_time + s->max_delay;
+ } else {
+ wait_end = 0;
+ first_queue_st = NULL;
+ }
}
/* read next RTP packet */
- redo:
if (!rt->recvbuf) {
rt->recvbuf = av_malloc(RECVBUF_SIZE);
if (!rt->recvbuf)