[FFmpeg-cvslog] lavf: dont open a decoder at the top of find_stream_info before probing has finished

Michael Niedermayer git at videolan.org
Sun Sep 23 05:46:39 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Sep 23 04:49:59 2012 +0200| [61a84755a9602f315508cc6d2916ebd30e331d28] | committer: Michael Niedermayer

lavf: dont open a decoder at the top of find_stream_info before probing has finished

It could open the wrong decoder.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=61a84755a9602f315508cc6d2916ebd30e331d28
---

 libavformat/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 0a79fe7..0732c46 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2557,7 +2557,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
                               : &thread_opt);
 
         //try to just open decoders, in case this is enough to get parameters
-        if (!has_codec_parameters(st, NULL)) {
+        if (!has_codec_parameters(st, NULL) && st->request_probe <= 0) {
             if (codec && !st->codec->codec)
                 avcodec_open2(st->codec, codec, options ? &options[i]
                               : &thread_opt);



More information about the ffmpeg-cvslog mailing list