From 20f1c96c89e9b5d57a83f81eee4191938c952764 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 24 Sep 2013 10:42:06 +0200 Subject: [PATCH] collectpads: Make sure that the object lock is always taken when accessing the private pad list https://bugzilla.gnome.org/show_bug.cgi?id=708636 --- libs/gst/base/gstcollectpads.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/gst/base/gstcollectpads.c b/libs/gst/base/gstcollectpads.c index c61b472..3d69abd 100644 --- a/libs/gst/base/gstcollectpads.c +++ b/libs/gst/base/gstcollectpads.c @@ -726,7 +726,7 @@ unknown_pad: } /* - * Must be called with STREAM_LOCK. + * Must be called with STREAM_LOCK and OBJECT_LOCK. */ static void gst_collect_pads_set_flushing_unlocked (GstCollectPads * pads, @@ -778,7 +778,9 @@ gst_collect_pads_set_flushing (GstCollectPads * pads, gboolean flushing) /* NOTE since this eventually calls _pop, some (STREAM_)LOCK is needed here */ GST_COLLECT_PADS_STREAM_LOCK (pads); + GST_OBJECT_LOCK (pads); gst_collect_pads_set_flushing_unlocked (pads, flushing); + GST_OBJECT_UNLOCK (pads); GST_COLLECT_PADS_STREAM_UNLOCK (pads); } -- 2.7.4