From 1f7e9be0b034b31617c94b6f7f37a350b9f43c88 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Fri, 21 Feb 2014 17:27:20 +0100 Subject: [PATCH 1/2] Only complain about missing frame rate for video streams. --- libavformat/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index c4d09e99ac..b5c5e9015b 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3062,6 +3062,7 @@ 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 && strcmp(ic->iformat->name, "image2")) av_log(ic, AV_LOG_WARNING, "Stream #%d: not enough frames to estimate rate; " From f5fe6a4f79fafbe6a9ec0c40fc3f38f9f2279c8a Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Fri, 21 Feb 2014 17:27:37 +0100 Subject: [PATCH 2/2] Do not warn about missing start time for unknown streams. --- libavformat/utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index b5c5e9015b..04c10a072d 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");