avformat_find_stream_info: try to preserve the error code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-07-02 15:02:55 +02:00
parent ccba9535dc
commit c826c5698b

View File

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