diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-26 22:10:41 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-26 22:33:01 +0200 |
commit | e6a084641aada7a2e4672172f2ee26642800a361 (patch) | |
tree | e987fdfdf06cf1647006a830d56b677206c4b157 /libavformat/utils.c | |
parent | 52887aa409bf61ae949bf7b212cf9209feb14783 (diff) | |
download | ffmpeg-e6a084641aada7a2e4672172f2ee26642800a361.tar.gz |
avformat/utils: set max analyze duration depending on the circumstances
Fixes Ticket3673
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index f07a33e6d5..f35e956f74 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3291,8 +3291,12 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) int64_t t = 0; int max_analyze_duration = ic->max_analyze_duration; - if (!max_analyze_duration) - max_analyze_duration = 5*AV_TIME_BASE; + if (!max_analyze_duration) { + if (!strcmp(ic->iformat->name, "flv") && !(ic->ctx_flags & AVFMTCTX_NOHEADER)) { + max_analyze_duration = 10*AV_TIME_BASE; + } else + max_analyze_duration = 5*AV_TIME_BASE; + } if (st->time_base.den > 0) t = av_rescale_q(st->info->codec_info_duration, st->time_base, AV_TIME_BASE_Q); |