avformat_find_stream_info: try to preserve the error code
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 2 Jul 2013 13:02:55 +0000 (15:02 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 2 Jul 2013 13:07:51 +0000 (15:07 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c

index af2f967..962370c 100644 (file)
@@ -2888,6 +2888,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
         int err = 0;
         av_init_packet(&empty_pkt);
 
+        if (ret >= 0)
         ret = -1; /* we could not have all the codec parameters before EOF */
         for(i=0;i<ic->nb_streams;i++) {