[FFmpeg-devel] [PATCH]Only complain about missing rates for audio and video streams

Carl Eugen Hoyos cehoyos at ag.or.at
Fri Feb 21 09:24:59 CET 2014


Hi!

Attached patch silences a warning for unknown streams and subtitle streams 
that probably makes no sense.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/utils.c b/libavformat/utils.c
index c4d09e9..2e1ab0e 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3062,6 +3062,8 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
             for (i = 0; i < ic->nb_streams; i++)
                 if (!ic->streams[i]->r_frame_rate.num &&
                     ic->streams[i]->info->duration_count <= 1 &&
+                    (ic->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO ||
+                     ic->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) &&
                     strcmp(ic->iformat->name, "image2"))
                     av_log(ic, AV_LOG_WARNING,
                            "Stream #%d: not enough frames to estimate rate; "


More information about the ffmpeg-devel mailing list