File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
subprojects/gstreamer/gst Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -770,13 +770,12 @@ gst_element_add_pad (GstElement * element, GstPad * pad)
770
770
GST_OBJECT_FLAG_SET (pad , GST_PAD_FLAG_NEED_PARENT );
771
771
GST_OBJECT_UNLOCK (pad );
772
772
773
+ GST_OBJECT_LOCK (element );
773
774
/* Check whether we need to switch to using the hash */
774
775
if ((element -> pads_hash == NULL ) &&
775
776
(element -> numpads_use_hash >= 0 ) &&
776
777
(element -> numpads + 1 ) >= (element -> numpads_use_hash )) {
777
778
778
- GST_OBJECT_LOCK (element );
779
-
780
779
/* Time to switch to using the hash */
781
780
element -> pads_hash = g_hash_table_new_full (g_str_hash , g_str_equal , g_free , NULL );
782
781
@@ -787,13 +786,9 @@ gst_element_add_pad (GstElement * element, GstPad * pad)
787
786
child_pad = GST_PAD_CAST (walk -> data );
788
787
g_hash_table_insert (element -> pads_hash , g_strdup (GST_PAD_NAME (child_pad )), child_pad );
789
788
}
790
-
791
- GST_OBJECT_UNLOCK (element );
792
789
}
793
790
794
791
/* then check to see if there's already a pad by that name here */
795
- GST_OBJECT_LOCK (element );
796
-
797
792
if (!GST_OBJECT_FLAG_IS_SET (element , GST_ELEMENT_FLAG_NO_UNIQUE_CHECK )) {
798
793
if (element -> pads_hash != NULL ) {
799
794
/* Use the hash table to look up whether we already have an pad with that
You can’t perform that action at this time.
0 commit comments