mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
gstaggregator: fix event use after free
https://bugzilla.gnome.org/show_bug.cgi?id=781017
This commit is contained in:
parent
5fefb1b866
commit
d5f42683ef
1 changed files with 3 additions and 8 deletions
|
@ -2351,17 +2351,12 @@ gst_aggregator_pad_event_func (GstPad * pad, GstObject * parent,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event) {
|
if (event) {
|
||||||
|
gboolean is_caps = (GST_EVENT_TYPE (event) == GST_EVENT_CAPS);
|
||||||
|
|
||||||
if (!klass->sink_event (self, aggpad, event)) {
|
if (!klass->sink_event (self, aggpad, event)) {
|
||||||
/* Copied from GstPad to convert boolean to a GstFlowReturn in
|
/* Copied from GstPad to convert boolean to a GstFlowReturn in
|
||||||
* the event handling func */
|
* the event handling func */
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
ret = is_caps ? GST_FLOW_NOT_NEGOTIATED : GST_FLOW_ERROR;
|
||||||
case GST_EVENT_CAPS:
|
|
||||||
ret = GST_FLOW_NOT_NEGOTIATED;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ret = GST_FLOW_ERROR;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue