]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/utils.c
ffplay: dynamically allocate filename buffer
[ffmpeg] / libavformat / utils.c
index 24eacf3967560ce30e790f7aee69343a990c1db8..199e80be8bf9f84ebc9e3b08432f86ad965c4761 100644 (file)
@@ -2369,7 +2369,7 @@ static void update_stream_timings(AVFormatContext *ic)
         /* compute the bitrate */
         double bitrate = (double) filesize * 8.0 * AV_TIME_BASE /
                          (double) ic->duration;
-        if (bitrate >= 0 && bitrate <= INT_MAX)
+        if (bitrate >= 0 && bitrate <= INT64_MAX)
             ic->bit_rate = bitrate;
     }
 }
@@ -2614,10 +2614,10 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset)
                     (double) st->duration   / AV_TIME_BASE);
         }
         av_log(ic, AV_LOG_TRACE,
-                "stream: start_time: %0.3f duration: %0.3f bitrate=%d kb/s\n",
+                "stream: start_time: %0.3f duration: %0.3f bitrate=%"PRId64" kb/s\n",
                 (double) ic->start_time / AV_TIME_BASE,
                 (double) ic->duration   / AV_TIME_BASE,
-                ic->bit_rate / 1000);
+                (int64_t)ic->bit_rate / 1000);
     }
 }
 
@@ -3085,23 +3085,11 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
     // new streams might appear, no options for those
     int orig_nb_streams = ic->nb_streams;
     int flush_codecs;
-#if FF_API_PROBESIZE_32
-    int64_t max_analyze_duration = ic->max_analyze_duration2;
-#else
     int64_t max_analyze_duration = ic->max_analyze_duration;
-#endif
     int64_t max_stream_analyze_duration;
     int64_t max_subtitle_analyze_duration;
-#if FF_API_PROBESIZE_32
-    int64_t probesize = ic->probesize2;
-#else
     int64_t probesize = ic->probesize;
-#endif
 
-    if (!max_analyze_duration)
-        max_analyze_duration = ic->max_analyze_duration;
-    if (ic->probesize)
-        probesize = ic->probesize;
     flush_codecs = probesize > 0;
 
     av_opt_set(ic, "skip_clear", "1", AV_OPT_SEARCH_CHILDREN);