projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7295cf
)
input-selector: Hold pad object lock when changing tags
author
Jan Schmidt
<jan@centricular.com>
Fri, 11 Apr 2014 12:38:25 +0000
(22:38 +1000)
committer
Jan Schmidt
<jan@centricular.com>
Fri, 11 Apr 2014 12:39:36 +0000
(22:39 +1000)
Avoid spurious crashes when tags are retrieved just as
new ones arrive.
plugins/elements/gstinputselector.c
patch
|
blob
|
history
diff --git
a/plugins/elements/gstinputselector.c
b/plugins/elements/gstinputselector.c
index
8fd9e59
..
45db79b
100644
(file)
--- a/
plugins/elements/gstinputselector.c
+++ b/
plugins/elements/gstinputselector.c
@@
-506,10
+506,13
@@
gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
gst_event_parse_tag (event, &tags);
+ GST_OBJECT_LOCK (selpad);
oldtags = selpad->tags;
newtags = gst_tag_list_merge (oldtags, tags, GST_TAG_MERGE_REPLACE);
selpad->tags = newtags;
+ GST_OBJECT_UNLOCK (selpad);
+
if (oldtags)
gst_tag_list_unref (oldtags);
GST_DEBUG_OBJECT (pad, "received tags %" GST_PTR_FORMAT, newtags);