From 58ee09911e0dab6432b18e9a2c5a876fdf8ef078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 1 Oct 2010 17:50:24 +0000 Subject: 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 --- libavformat/rtsp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libavformat/rtsp.c') diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 92aa352..1e4b9c1 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; -- cgit v1.1