mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-07 15:02:40 +00:00
dashdemux: Change period when setting by period id.
Make gst_mpd_client_set_period_id set the current period index when it finds a period with a matching period id. https://bugzilla.gnome.org/show_bug.cgi?id=741322
This commit is contained in:
parent
8b63a16af0
commit
1c0c6b6f48
1 changed files with 4 additions and 1 deletions
|
@ -3845,17 +3845,20 @@ gst_mpd_client_set_period_id (GstMpdClient * client, const gchar * period_id)
|
||||||
GstStreamPeriod *next_stream_period;
|
GstStreamPeriod *next_stream_period;
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
GList *iter;
|
GList *iter;
|
||||||
|
guint period_idx;
|
||||||
|
|
||||||
g_return_val_if_fail (client != NULL, FALSE);
|
g_return_val_if_fail (client != NULL, FALSE);
|
||||||
g_return_val_if_fail (client->periods != NULL, FALSE);
|
g_return_val_if_fail (client->periods != NULL, FALSE);
|
||||||
g_return_val_if_fail (period_id != NULL, FALSE);
|
g_return_val_if_fail (period_id != NULL, FALSE);
|
||||||
|
|
||||||
for (iter = client->periods; iter; iter = g_list_next (iter)) {
|
for (period_idx = 0, iter = client->periods; iter;
|
||||||
|
period_idx++, iter = g_list_next (iter)) {
|
||||||
next_stream_period = iter->data;
|
next_stream_period = iter->data;
|
||||||
|
|
||||||
if (next_stream_period->period->id
|
if (next_stream_period->period->id
|
||||||
&& strcmp (next_stream_period->period->id, period_id) == 0) {
|
&& strcmp (next_stream_period->period->id, period_id) == 0) {
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
|
client->period_idx = period_idx;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue