summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-08-19 17:49:58 +0000
committerAnton Khirnov <anton@khirnov.net>2014-08-25 05:17:54 +0000
commitb263f8ffe7599d9cd27ec477a12700da8eb2790d (patch)
tree767e7de253a0b6ed3ef1b7e817b9b87f736d593f /libavformat/utils.c
parent6ca11f7157d0ffd11ea9a4211b04981b46dc75d6 (diff)
lavf: add AVFormatContext.max_ts_probe
It allows to configure how long will avformat_find_stream_info() wait to get the first timestamp.
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 4cc246d9ee..faad9c9db4 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2108,6 +2108,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
!st->codec->extradata)
break;
if (st->first_dts == AV_NOPTS_VALUE &&
+ st->codec_info_nb_frames < ic->max_ts_probe &&
(st->codec->codec_type == AVMEDIA_TYPE_VIDEO ||
st->codec->codec_type == AVMEDIA_TYPE_AUDIO))
break;