aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-01-07 21:26:59 +0200
committerMartin Storsjö <martin@martin.st>2013-01-08 11:22:43 +0200
commitf811cd2d47ade37a3e66f12260807aa63375ca50 (patch)
tree19f702779aa74c8ff6f4476574c46b7a23ae6d44
parent8729698d50739524665090e083d1bfdf28235724 (diff)
downloadffmpeg-f811cd2d47ade37a3e66f12260807aa63375ca50.tar.gz
rtsp: Respect max_delay for the reordering queue when using custom IO
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavformat/rtsp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index b3e54442af..ba9b756879 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1912,7 +1912,11 @@ redo:
ff_rtp_check_and_send_back_rr(rtsp_st->transport_priv, rtsp_st->rtp_handle, NULL, len);
break;
case RTSP_LOWER_TRANSPORT_CUSTOM:
- len = ffio_read_partial(s->pb, rt->recvbuf, RECVBUF_SIZE);
+ if (first_queue_st && rt->transport == RTSP_TRANSPORT_RTP &&
+ wait_end && wait_end < av_gettime())
+ len = AVERROR(EAGAIN);
+ else
+ len = ffio_read_partial(s->pb, rt->recvbuf, RECVBUF_SIZE);
len = pick_stream(s, &rtsp_st, rt->recvbuf, len);
if (len > 0 && rtsp_st->transport_priv && rt->transport == RTSP_TRANSPORT_RTP)
ff_rtp_check_and_send_back_rr(rtsp_st->transport_priv, NULL, s->pb, len);