aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer2014-02-21 18:45:11 +0100
committerMichael Niedermayer2014-02-21 18:45:16 +0100
commitc8f3c3a5794d9a426b48af401437f385b0cc9b94 (patch)
treec72338d0281684f269dac37ae6ecc8baa2b01bbd
parenta0f8e6ad67b0eeb32778db532d40f545c4f38191 (diff)
parentf5fe6a4f79fafbe6a9ec0c40fc3f38f9f2279c8a (diff)
Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master: Do not warn about missing start time for unknown streams. Only complain about missing frame rate for video streams. Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index c4d09e99ac..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");
@@ -3062,6 +3064,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; "