Commit 2db58d96 authored by michael's avatar michael

Try to open decoders in av_find_stream_info() even if no packets for the

stream are found.
Fixes issue1385


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21630 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent c1824279
...@@ -2089,6 +2089,13 @@ int av_find_stream_info(AVFormatContext *ic) ...@@ -2089,6 +2089,13 @@ int av_find_stream_info(AVFormatContext *ic)
st->parser->flags |= PARSER_FLAG_COMPLETE_FRAMES; 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++){ for(i=0;i<MAX_STREAMS;i++){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment