Commit 29afa758 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

multifilesrc: fix regression with starting from index set via index property

When we haven't started yet, set the start_index when we set the index property,
so that we start at the right index position after the initial seek. The index
property was never really meant to be for writing, but it used to work, so let's
support it for backwards compatibility.

https://bugzilla.gnome.org/show_bug.cgi?id=739472
parent 5d99d0df
......@@ -299,7 +299,14 @@ gst_multi_file_src_set_property (GObject * object, guint prop_id,
gst_multi_file_src_set_location (src, g_value_get_string (value));
break;
case PROP_INDEX:
src->index = g_value_get_int (value);
GST_OBJECT_LOCK (src);
/* index was really meant to be read-only, but for backwards-compatibility
* we set start_index to make it work as it used to */
if (!GST_OBJECT_FLAG_IS_SET (src, GST_BASE_SRC_FLAG_STARTED))
src->start_index = g_value_get_int (value);
else
src->index = g_value_get_int (value);
GST_OBJECT_UNLOCK (src);
break;
case PROP_START_INDEX:
src->start_index = g_value_get_int (value);
......
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