[FFmpeg-cvslog] libavformat: Only require first packet to be known for audio/video streams
Joakim Plate
git at videolan.org
Sat Apr 7 23:03:28 CEST 2012
ffmpeg | branch: master | Joakim Plate <elupus at ecce.se> | Sun Sep 11 00:33:20 2011 +0200| [ba24f129824d21aa0f7312e90d0cf5b7fd9cf043] | committer: Martin Storsjö
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 at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ba24f129824d21aa0f7312e90d0cf5b7fd9cf043
---
libavformat/utils.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index f38045c..6ebfabb 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2306,7 +2306,9 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
break;
if(st->parser && st->parser->parser->split && !st->codec->extradata)
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;
}
if (i == ic->nb_streams) {
More information about the ffmpeg-cvslog
mailing list