concat: Make QoS forward MT-safe

In the same way it's done for other event forwarding.
This commit is contained in:
Edward Hervey 2017-11-09 17:38:19 +01:00 committed by Edward Hervey
parent 4670036691
commit 08ad748ced

View file

@ -715,7 +715,14 @@ gst_concat_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
GstClockTimeDiff diff;
GstClockTime timestamp;
gdouble proportion;
GstPad *sinkpad = NULL;
g_mutex_lock (&self->lock);
if ((sinkpad = self->current_sinkpad))
gst_object_ref (sinkpad);
g_mutex_unlock (&self->lock);
if (sinkpad) {
gst_event_parse_qos (event, &type, &proportion, &diff, &timestamp);
gst_event_unref (event);
@ -727,6 +734,11 @@ gst_concat_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
} else {
ret = FALSE;
}
gst_object_unref (sinkpad);
} else {
gst_event_unref (event);
ret = FALSE;
}
break;
}
case GST_EVENT_FLUSH_STOP:{