mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
input-selector: Hold pad object lock when changing tags
Avoid spurious crashes when tags are retrieved just as new ones arrive.
This commit is contained in:
parent
c7295cf4b9
commit
a89789366f
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue