diff options
author | Martin Storsjö <martin@martin.st> | 2012-03-19 20:40:23 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-03-20 10:53:49 +0200 |
commit | ccfa8aa26f666372f47d69bc49e420a9b4239626 (patch) | |
tree | 1f702d979a3f394d628e66735a97cf6b77f2524a /libavformat/rtsp.c | |
parent | 4fa57d524f16524e9735f99b387167149dbf5a7b (diff) | |
download | ffmpeg-ccfa8aa26f666372f47d69bc49e420a9b4239626.tar.gz |
rtsp: Set the default delay to 0.1 s for the RTSP/SDP/RTP demuxers
This enables reordering of UDP packets by default, unless the caller
explicitly sets -max_delay 0.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 7afd106cfb..07cf80992e 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -56,6 +56,7 @@ #define MAX_TIMEOUTS READ_PACKET_TIMEOUT_S * 1000 / POLL_TIMEOUT_MS #define SDP_MAX_SIZE 16384 #define RECVBUF_SIZE 10 * RTP_MAX_PACKET_LENGTH +#define DEFAULT_REORDERING_DELAY 100000 #define OFFSET(x) offsetof(RTSPState, x) #define DEC AV_OPT_FLAG_DECODING_PARAM @@ -1427,7 +1428,7 @@ int ff_rtsp_connect(AVFormatContext *s) return AVERROR(EIO); if (s->max_delay < 0) /* Not set by the caller */ - s->max_delay = 0; + s->max_delay = s->iformat ? DEFAULT_REORDERING_DELAY : 0; rt->control_transport = RTSP_MODE_PLAIN; if (rt->lower_transport_mask & (1 << RTSP_LOWER_TRANSPORT_HTTP)) { @@ -1870,7 +1871,7 @@ static int sdp_read_header(AVFormatContext *s) return AVERROR(EIO); if (s->max_delay < 0) /* Not set by the caller */ - s->max_delay = 0; + s->max_delay = DEFAULT_REORDERING_DELAY; /* read the whole sdp file */ /* XXX: better loading */ |