mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
deinterleave: Don't hold object lock while sending events downstream
Based on a patch by Kishore Arepalli <kishore.arepalli@gmail.com> https://bugzilla.gnome.org/show_bug.cgi?id=703114
This commit is contained in:
parent
75b5a54f17
commit
5f6469fe2a
1 changed files with 11 additions and 12 deletions
|
@ -685,29 +685,28 @@ gst_deinterleave_process (GstDeinterleave * self, GstBuffer * buf)
|
|||
GstBuffer **buffers_out = g_new0 (GstBuffer *, channels);
|
||||
guint8 *in, *out;
|
||||
GstMapInfo read_info;
|
||||
|
||||
gst_buffer_map (buf, &read_info, GST_MAP_READ);
|
||||
GList *pending_events, *l;
|
||||
|
||||
/* Send any pending events to all src pads */
|
||||
GST_OBJECT_LOCK (self);
|
||||
if (self->pending_events) {
|
||||
GList *events;
|
||||
pending_events = self->pending_events;
|
||||
self->pending_events = NULL;
|
||||
GST_OBJECT_UNLOCK (self);
|
||||
|
||||
if (pending_events) {
|
||||
GstEvent *event;
|
||||
|
||||
GST_DEBUG_OBJECT (self, "Sending pending events to all src pads");
|
||||
|
||||
for (events = self->pending_events; events != NULL; events = events->next) {
|
||||
event = GST_EVENT (events->data);
|
||||
|
||||
for (l = pending_events; l; l = l->next) {
|
||||
event = l->data;
|
||||
for (srcs = self->srcpads; srcs != NULL; srcs = srcs->next)
|
||||
gst_pad_push_event (GST_PAD (srcs->data), gst_event_ref (event));
|
||||
gst_event_unref (event);
|
||||
}
|
||||
|
||||
g_list_free (self->pending_events);
|
||||
self->pending_events = NULL;
|
||||
g_list_free (pending_events);
|
||||
}
|
||||
GST_OBJECT_UNLOCK (self);
|
||||
|
||||
gst_buffer_map (buf, &read_info, GST_MAP_READ);
|
||||
|
||||
/* Allocate buffers */
|
||||
for (srcs = self->srcpads, i = 0; srcs; srcs = srcs->next, i++) {
|
||||
|
|
Loading…
Reference in a new issue