]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/utils.c
Merge branch 'ronalds_buggy_gt8bit_sws'
[ffmpeg] / libavformat / utils.c
index e0a5455d758f5ac9387fe96ba631f37f133c70e5..4d8b9225fbc8686f9ea0b94aae74e3e04bdfa183 100644 (file)
@@ -2345,7 +2345,10 @@ int av_find_stream_info(AVFormatContext *ic)
         /* NOTE: a new stream can be added there if no header in file
            (AVFMTCTX_NOHEADER) */
         ret = av_read_frame_internal(ic, &pkt1);
-        if (ret < 0 && ret != AVERROR(EAGAIN)) {
+        if (ret == AVERROR(EAGAIN))
+            continue;
+
+        if (ret < 0) {
             /* EOF or error */
             ret = -1; /* we could not have all the codec parameters before EOF */
             for(i=0;i<ic->nb_streams;i++) {
@@ -2361,9 +2364,6 @@ int av_find_stream_info(AVFormatContext *ic)
             break;
         }
 
-        if (ret == AVERROR(EAGAIN))
-            continue;
-
         pkt= add_to_pktbuf(&ic->packet_buffer, &pkt1, &ic->packet_buffer_end);
         if ((ret = av_dup_packet(pkt)) < 0)
             goto find_stream_info_err;