diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-02-03 23:05:58 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-02-03 23:05:58 +0000 |
commit | 43e4d57f667dae98866ed56f3bcf5063f0e66c3a (patch) | |
tree | 372a6699a257d8bf4090134d677d0bd6bb7c744d | |
parent | b25453bdfc0c8e4d28507d160ff8fe85e6415460 (diff) | |
download | ffmpeg-43e4d57f667dae98866ed56f3bcf5063f0e66c3a.tar.gz |
Try to open decoders in av_find_stream_info() even if no packets for the
stream are found.
Fixes issue1385
Originally committed as revision 21630 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/utils.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 8295f704ee..eec7a62f6b 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2089,6 +2089,13 @@ int av_find_stream_info(AVFormatContext *ic) st->parser->flags |= PARSER_FLAG_COMPLETE_FRAMES; } } + assert(!st->codec->codec); + //try to just open decoders, in case this is enough to get parameters + if(!has_codec_parameters(st->codec)){ + AVCodec *codec = avcodec_find_decoder(st->codec->codec_id); + if (codec) + avcodec_open(st->codec, codec); + } } for(i=0;i<MAX_STREAMS;i++){ |