From 4fa57d524f16524e9735f99b387167149dbf5a7b Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Mon, 19 Mar 2012 20:37:10 +0200 Subject: libavformat: Set the default for the max_delay option to -1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ö --- libavformat/mpegenc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavformat/mpegenc.c') diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index 852b3f13c9..bda8d8324b 100644 --- a/libavformat/mpegenc.c +++ b/libavformat/mpegenc.c @@ -318,6 +318,8 @@ static int mpeg_mux_init(AVFormatContext *ctx) s->packet_size = ctx->packet_size; } else s->packet_size = 2048; + if (ctx->max_delay < 0) /* Not set by the caller */ + ctx->max_delay = 0; s->vcd_padding_bytes_written = 0; s->vcd_padding_bitrate=0; -- cgit v1.2.3