lavf: add AVFormatContext.max_ts_probe
It allows to configure how long will avformat_find_stream_info() wait to get the first timestamp.
This commit is contained in:
parent
6ca11f7157
commit
b263f8ffe7
5 changed files with 12 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue