Commit e8c56278 authored by Stefan Sauer's avatar Stefan Sauer

basesrc: move the quick return up

Don't assign local vars if we skip anyway. Add logging for failure conditio
parent acb67fee
......@@ -2310,20 +2310,18 @@ gst_base_src_update_length (GstBaseSrc * src, guint64 offset, guint * length,
{
guint64 size, maxsize;
GstBaseSrcClass *bclass;
GstFormat format;
gint64 stop;
/* only operate if we are working with bytes */
if (src->segment.format != GST_FORMAT_BYTES)
return TRUE;
bclass = GST_BASE_SRC_GET_CLASS (src);
format = src->segment.format;
stop = src->segment.stop;
/* get total file size */
size = src->segment.duration;
/* only operate if we are working with bytes */
if (format != GST_FORMAT_BYTES)
return TRUE;
/* when not doing automatic EOS, just use the stop position. We don't use
* the size to check for EOS */
if (!g_atomic_int_get (&src->priv->automatic_eos))
......@@ -2379,6 +2377,7 @@ gst_base_src_update_length (GstBaseSrc * src, guint64 offset, guint * length,
/* ERRORS */
unexpected_length:
{
GST_WARNING_OBJECT (src, "processing at or past EOS");
return FALSE;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment