timedvaluecontrolsource: Fix removing all keyframes, and adding one back

We were segfaulting because g_sequence_search was returning the iter_end,
and that iterator does not contain anything and thus should not be used
directly
This commit is contained in:
Thibault Saunier 2015-05-16 11:17:40 +02:00
parent 8c85795e92
commit 78bbaeb6e7

View file

@ -182,7 +182,7 @@ gst_timed_value_control_source_set_internal (GstTimedValueControlSource *
iter =
g_sequence_search (self->values, &timestamp,
(GCompareDataFunc) gst_control_point_find, NULL);
if (iter) {
if (iter && !g_sequence_iter_is_end (iter)) {
GSequenceIter *prev = g_sequence_iter_prev (iter);
GstControlPoint *cp = g_sequence_get (prev);