diff options
author | Martin Storsjö <martin@martin.st> | 2010-10-01 17:50:24 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-10-01 17:50:24 +0000 |
commit | 58ee09911e0dab6432b18e9a2c5a876fdf8ef078 (patch) | |
tree | 1180f080d8185600d0b538f2a54d3e43b392b4bd /libavformat/rtsp.c | |
parent | 0260741876b535c11cef43a959d1a9a970a308e9 (diff) | |
download | ffmpeg-58ee09911e0dab6432b18e9a2c5a876fdf8ef078.tar.gz |
rtpdec: Reorder received RTP packets according to the seq number
Reordering is enabled only when receiving over UDP.
Originally committed as revision 25294 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 92aa352703..1e4b9c1db7 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -582,7 +582,9 @@ static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st) rtsp_st->dynamic_handler); else rtsp_st->transport_priv = rtp_parse_open(s, st, rtsp_st->rtp_handle, - rtsp_st->sdp_payload_type); + rtsp_st->sdp_payload_type, + (rt->lower_transport == RTSP_LOWER_TRANSPORT_TCP || !s->max_delay) + ? 0 : RTP_REORDER_QUEUE_DEFAULT_SIZE); if (!rtsp_st->transport_priv) { return AVERROR(ENOMEM); @@ -1270,6 +1272,7 @@ static int rtsp_read_play(AVFormatContext *s) continue; if (rtsp_st->stream_index >= 0) st = s->streams[rtsp_st->stream_index]; + ff_rtp_reset_packet_queue(rtpctx); if (reply->range_start != AV_NOPTS_VALUE) { rtpctx->last_rtcp_ntp_time = AV_NOPTS_VALUE; rtpctx->first_rtcp_ntp_time = AV_NOPTS_VALUE; |