summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-03-19 20:37:10 +0200
committerMartin Storsjö <martin@martin.st>2012-03-20 10:53:47 +0200
commit4fa57d524f16524e9735f99b387167149dbf5a7b (patch)
tree4ef1afda4d72d8c44e45c52cc845e06011e4f607 /libavformat/rtsp.c
parent0d0b81f941a2d5011bec754ba48e84a479306661 (diff)
libavformat: Set the default for the max_delay option to -1
Make the muxers/demuxers that use the field handle the default -1 in the same way as 0. This allows distinguishing an intentionally set 0 from the default value where the user hasn't set it. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 56deed3b3a..7afd106cfb 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1426,6 +1426,9 @@ int ff_rtsp_connect(AVFormatContext *s)
if (!ff_network_init())
return AVERROR(EIO);
+ if (s->max_delay < 0) /* Not set by the caller */
+ s->max_delay = 0;
+
rt->control_transport = RTSP_MODE_PLAIN;
if (rt->lower_transport_mask & (1 << RTSP_LOWER_TRANSPORT_HTTP)) {
rt->lower_transport_mask = 1 << RTSP_LOWER_TRANSPORT_TCP;
@@ -1866,6 +1869,9 @@ static int sdp_read_header(AVFormatContext *s)
if (!ff_network_init())
return AVERROR(EIO);
+ if (s->max_delay < 0) /* Not set by the caller */
+ s->max_delay = 0;
+
/* read the whole sdp file */
/* XXX: better loading */
content = av_malloc(SDP_MAX_SIZE);