From bc33d22635890402faa95755d794ed3ffd817087 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Thu, 6 Aug 2015 11:30:04 -0300 Subject: [PATCH] hlsdemux: don't warn about duration if it is not known And also print the values in case of warning --- ext/hls/m3u8.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ext/hls/m3u8.c b/ext/hls/m3u8.c index 5e78d948e2..1273b71016 100755 --- a/ext/hls/m3u8.c +++ b/ext/hls/m3u8.c @@ -519,8 +519,11 @@ gst_m3u8_update (GstM3U8Client * client, GstM3U8 * self, gchar * data, goto next_line; } duration = fval * (gdouble) GST_SECOND; - if (duration > self->targetduration) - GST_WARNING ("EXTINF duration > TARGETDURATION"); + if (self->targetduration > 0 && duration > self->targetduration) { + GST_WARNING ("EXTINF duration (%" GST_TIME_FORMAT + ") > TARGETDURATION (%" GST_TIME_FORMAT ")", + GST_TIME_ARGS (duration), GST_TIME_ARGS (self->targetduration)); + } if (!data || *data != ',') goto next_line; data = g_utf8_next_char (data);