Revert "avimux, flvmux, matroskamux: don't crash if tags arrive on multiple input pads at the same time"

This reverts commit 6a9983cd20.

Rely on locking done in GstTagSetter in core git.
This commit is contained in:
Tim-Philipp Müller 2010-06-01 09:26:11 +01:00
parent 0005a3da24
commit d51576b14c
3 changed files with 2 additions and 24 deletions

View file

@ -1166,10 +1166,7 @@ gst_avi_mux_riff_get_avi_header (GstAviMux * avimux)
else {
/* need to make snapshot of current state of tags to ensure the same set
* is used next time around during header rewrite at the end */
/* FIXME: remove locking again after GstTagSetter has been fixed */
GST_OBJECT_LOCK (avimux);
tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (avimux));
GST_OBJECT_UNLOCK (avimux);
if (tags)
tags = avimux->tags_snap = gst_tag_list_copy (tags);
}
@ -1922,15 +1919,10 @@ gst_avi_mux_handle_event (GstPad * pad, GstEvent * event)
case GST_EVENT_TAG:{
GstTagList *list;
GstTagSetter *setter = GST_TAG_SETTER (avimux);
GstTagMergeMode mode;
const GstTagMergeMode mode = gst_tag_setter_get_tag_merge_mode (setter);
gst_event_parse_tag (event, &list);
/* FIXME: remove locking again after GstTagSetter has been fixed */
GST_OBJECT_LOCK (avimux);
mode = gst_tag_setter_get_tag_merge_mode (setter);
gst_tag_setter_merge_tags (setter, list, mode);
GST_OBJECT_UNLOCK (avimux);
break;
}
default:

View file

@ -256,15 +256,10 @@ gst_flv_mux_handle_sink_event (GstPad * pad, GstEvent * event)
case GST_EVENT_TAG:{
GstTagList *list;
GstTagSetter *setter = GST_TAG_SETTER (mux);
GstTagMergeMode mode;
const GstTagMergeMode mode = gst_tag_setter_get_tag_merge_mode (setter);
gst_event_parse_tag (event, &list);
/* FIXME: remove locking again after GstTagSetter has been fixed */
GST_OBJECT_LOCK (mux);
mode = gst_tag_setter_get_tag_merge_mode (setter);
gst_tag_setter_merge_tags (setter, list, mode);
GST_OBJECT_UNLOCK (mux);
break;
}
case GST_EVENT_NEWSEGMENT:
@ -639,10 +634,7 @@ gst_flv_mux_create_metadata (GstFlvMux * mux)
guint8 *data;
gint i, n_tags, tags_written = 0;
/* FIXME: remove locking again after GstTagSetter has been fixed */
GST_OBJECT_LOCK (mux);
tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (mux));
GST_OBJECT_UNLOCK (mux);
GST_DEBUG_OBJECT (mux, "tags = %" GST_PTR_FORMAT, tags);

View file

@ -625,11 +625,8 @@ gst_matroska_mux_handle_sink_event (GstPad * pad, GstEvent * event)
g_free (lang);
}
/* FIXME: remove locking again after GstTagSetter has been fixed */
GST_OBJECT_LOCK (mux);
gst_tag_setter_merge_tags (GST_TAG_SETTER (mux), list,
gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (mux)));
GST_OBJECT_UNLOCK (mux);
break;
}
case GST_EVENT_NEWSEGMENT:
@ -2208,10 +2205,7 @@ gst_matroska_mux_finish (GstMatroskaMux * mux)
}
/* tags */
/* FIXME: remove locking again after GstTagSetter has been fixed */
GST_OBJECT_LOCK (mux);
tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (mux));
GST_OBJECT_UNLOCK (mux);
if (tags != NULL && !gst_tag_list_is_empty (tags)) {
guint64 master_tags, master_tag;