[FFmpeg-devel] [PATCH]Do not warn about missing start time for unknown streams

Carl Eugen Hoyos cehoyos at ag.or.at
Fri Feb 21 09:27:08 CET 2014


Hi!

Attached patch silences a warning for unknown streams, I don't think it is 
particularly useful to print any warnings apart from "unknown".

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/utils.c b/libavformat/utils.c
index c4d09e9..09a8fac 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2382,7 +2382,9 @@ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
 
     for (i = 0; i < ic->nb_streams; i++) {
         st = ic->streams[i];
-        if (st->start_time == AV_NOPTS_VALUE && st->first_dts == AV_NOPTS_VALUE)
+        if (st->start_time == AV_NOPTS_VALUE &&
+            st->first_dts == AV_NOPTS_VALUE &&
+            st->codec->codec_type != AVMEDIA_TYPE_UNKNOWN)
             av_log(st->codec, AV_LOG_WARNING,
                    "start time is not set in estimate_timings_from_pts\n");
 


More information about the ffmpeg-devel mailing list