From 07b27d6bd8c70e6ec937a9679bc683890d3fd4ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Fri, 8 Jan 2016 16:31:36 +0100 Subject: [PATCH] lavf: allow null max_analyze_duration --- libavformat/options_table.h | 2 +- libavformat/utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/options_table.h b/libavformat/options_table.h index cc64bea..e3fa12d 100644 --- a/libavformat/options_table.h +++ b/libavformat/options_table.h @@ -54,7 +54,7 @@ static const AVOption avformat_options[] = { {"nobuffer", "reduce the latency introduced by optional buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_NOBUFFER }, 0, INT_MAX, D, "fflags"}, {"seek2any", "allow seeking to non-keyframes on demuxer level when supported", OFFSET(seek2any), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, D}, {"bitexact", "do not write random/volatile data", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_BITEXACT }, 0, 0, E, "fflags" }, -{"analyzeduration", "specify how many microseconds are analyzed to probe the input", OFFSET(max_analyze_duration), AV_OPT_TYPE_INT64, {.i64 = 0 }, 0, INT64_MAX, D}, +{"analyzeduration", "specify how many microseconds are analyzed to probe the input", OFFSET(max_analyze_duration), AV_OPT_TYPE_INT64, {.i64 = -1 }, -1, INT64_MAX, D}, {"cryptokey", "decryption key", OFFSET(key), AV_OPT_TYPE_BINARY, {.dbl = 0}, 0, 0, D}, {"indexmem", "max memory used for timestamp index (per stream)", OFFSET(max_index_size), AV_OPT_TYPE_INT, {.i64 = 1<<20 }, 0, INT_MAX, D}, {"rtbufsize", "max memory used for buffering real-time frames", OFFSET(max_picture_buffer), AV_OPT_TYPE_INT, {.i64 = 3041280 }, 0, INT_MAX, D}, /* defaults to 1s of 15fps 352x288 YUYV422 video */ diff --git a/libavformat/utils.c b/libavformat/utils.c index 7606502..eb705de 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3137,7 +3137,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) max_stream_analyze_duration = max_analyze_duration; max_subtitle_analyze_duration = max_analyze_duration; - if (!max_analyze_duration) { + if (max_analyze_duration < 0) { max_stream_analyze_duration = max_analyze_duration = 5*AV_TIME_BASE; max_subtitle_analyze_duration = 30*AV_TIME_BASE; -- 2.7.0