hlsdemux: don't warn about duration if it is not known

And also print the values in case of warning
This commit is contained in:
Thiago Santos 2015-08-06 11:30:04 -03:00
parent 0553559fd2
commit bc33d22635

View file

@ -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);