mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
interpolationcontrolsource: Don't pass NULL pointers to GSequence API
This causes assertion failures. Fixes bug #610444.
This commit is contained in:
parent
82f380704a
commit
b30c7d370e
2 changed files with 11 additions and 3 deletions
|
@ -562,7 +562,7 @@ gst_interpolation_control_source_unset (GstInterpolationControlSource * self,
|
|||
|
||||
g_mutex_lock (self->lock);
|
||||
/* check if a control point for the timestamp exists */
|
||||
if ((iter =
|
||||
if (G_LIKELY (self->priv->values) && (iter =
|
||||
g_sequence_search (self->priv->values, ×tamp,
|
||||
(GCompareDataFunc) gst_control_point_find, NULL))) {
|
||||
GstControlPoint *cp;
|
||||
|
|
|
@ -950,14 +950,22 @@ GST_START_TEST (controller_interpolation_unset)
|
|||
res = gst_interpolation_control_source_unset (csource, 1 * GST_SECOND);
|
||||
fail_unless (res, NULL);
|
||||
|
||||
g_object_unref (csource);
|
||||
|
||||
/* verify value again */
|
||||
gst_controller_sync_values (ctrl, 1 * GST_SECOND);
|
||||
fail_unless_equals_int (GST_TEST_MONO_SOURCE (elem)->val_ulong, 0);
|
||||
gst_controller_sync_values (ctrl, 2 * GST_SECOND);
|
||||
fail_unless_equals_int (GST_TEST_MONO_SOURCE (elem)->val_ulong, 50);
|
||||
|
||||
/* unset all values, reset and try to unset again */
|
||||
fail_unless (gst_interpolation_control_source_unset (csource,
|
||||
0 * GST_SECOND));
|
||||
fail_unless (gst_interpolation_control_source_unset (csource,
|
||||
2 * GST_SECOND));
|
||||
gst_interpolation_control_source_unset_all (csource);
|
||||
fail_if (gst_interpolation_control_source_unset (csource, 2 * GST_SECOND));
|
||||
|
||||
g_object_unref (csource);
|
||||
|
||||
GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
|
||||
g_object_unref (ctrl);
|
||||
gst_object_unref (elem);
|
||||
|
|
Loading…
Reference in a new issue