mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
concat: Make QoS forward MT-safe
In the same way it's done for other event forwarding.
This commit is contained in:
parent
4670036691
commit
08ad748ced
1 changed files with 19 additions and 7 deletions
|
@ -715,16 +715,28 @@ gst_concat_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
GstClockTimeDiff diff;
|
GstClockTimeDiff diff;
|
||||||
GstClockTime timestamp;
|
GstClockTime timestamp;
|
||||||
gdouble proportion;
|
gdouble proportion;
|
||||||
|
GstPad *sinkpad = NULL;
|
||||||
|
|
||||||
gst_event_parse_qos (event, &type, &proportion, &diff, ×tamp);
|
g_mutex_lock (&self->lock);
|
||||||
gst_event_unref (event);
|
if ((sinkpad = self->current_sinkpad))
|
||||||
|
gst_object_ref (sinkpad);
|
||||||
|
g_mutex_unlock (&self->lock);
|
||||||
|
|
||||||
if (timestamp != GST_CLOCK_TIME_NONE
|
if (sinkpad) {
|
||||||
&& timestamp > self->current_start_offset) {
|
gst_event_parse_qos (event, &type, &proportion, &diff, ×tamp);
|
||||||
timestamp -= self->current_start_offset;
|
gst_event_unref (event);
|
||||||
event = gst_event_new_qos (type, proportion, diff, timestamp);
|
|
||||||
ret = gst_pad_push_event (self->current_sinkpad, event);
|
if (timestamp != GST_CLOCK_TIME_NONE
|
||||||
|
&& timestamp > self->current_start_offset) {
|
||||||
|
timestamp -= self->current_start_offset;
|
||||||
|
event = gst_event_new_qos (type, proportion, diff, timestamp);
|
||||||
|
ret = gst_pad_push_event (self->current_sinkpad, event);
|
||||||
|
} else {
|
||||||
|
ret = FALSE;
|
||||||
|
}
|
||||||
|
gst_object_unref (sinkpad);
|
||||||
} else {
|
} else {
|
||||||
|
gst_event_unref (event);
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue