mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
libavformat: Only require first packet to be known for audio/video streams
It can take a long time before subtitles or data streams show up, so we shouldn't wait for those before assuming we have all info for streams. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
951e715ceb
commit
ba24f12982
@ -2306,7 +2306,9 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
|
|||||||
break;
|
break;
|
||||||
if(st->parser && st->parser->parser->split && !st->codec->extradata)
|
if(st->parser && st->parser->parser->split && !st->codec->extradata)
|
||||||
break;
|
break;
|
||||||
if(st->first_dts == AV_NOPTS_VALUE)
|
if (st->first_dts == AV_NOPTS_VALUE &&
|
||||||
|
(st->codec->codec_type == AVMEDIA_TYPE_VIDEO ||
|
||||||
|
st->codec->codec_type == AVMEDIA_TYPE_AUDIO))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (i == ic->nb_streams) {
|
if (i == ic->nb_streams) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user