mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-20 06:08:14 +00:00
ext/metadata/gstbasemetadata.c: Avoid deadlock during pad activation.
Original commit message from CVS: * ext/metadata/gstbasemetadata.c: Avoid deadlock during pad activation. Fixes #561241.
This commit is contained in:
parent
6edbddd2d9
commit
a49918b152
2 changed files with 20 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2008-11-18 Alessandro Decina <alessandro.d@gmail.com>
|
||||||
|
|
||||||
|
* ext/metadata/gstbasemetadata.c:
|
||||||
|
Avoid deadlock during pad activation.
|
||||||
|
Fixes #561241.
|
||||||
|
|
||||||
2008-11-17 David Schleef <ds@schleef.org>
|
2008-11-17 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
* gst/qtmux/gstqtmux.c: Quiet a debugging message that I recently
|
* gst/qtmux/gstqtmux.c: Quiet a debugging message that I recently
|
||||||
|
|
|
@ -1807,16 +1807,24 @@ gst_base_metadata_sink_activate (GstPad * pad)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
gst_pad_activate_pull (pad, FALSE);
|
GstActivateMode mode;
|
||||||
gst_pad_activate_push (filter->srcpad, FALSE);
|
|
||||||
if (!gst_pad_is_active (pad)) {
|
/* in gst_base_metadata_pull_range_parse() we could have triggered
|
||||||
ret = gst_pad_activate_push (filter->srcpad, TRUE);
|
* negotiation and plugged new downstream elements.
|
||||||
ret = ret && gst_pad_activate_push (pad, TRUE);
|
* If GST_PAD_ACTIVATE_MODE (filter->srcpad) is GST_ACTIVATE_PULL it means
|
||||||
|
* that downstream is active in pull mode so we don't deactivate pull mode.
|
||||||
|
*/
|
||||||
|
GST_OBJECT_LOCK (filter->srcpad);
|
||||||
|
mode = GST_PAD_ACTIVATE_MODE (filter->srcpad);
|
||||||
|
GST_OBJECT_UNLOCK (filter->srcpad);
|
||||||
|
|
||||||
|
if (mode != GST_ACTIVATE_PULL) {
|
||||||
|
/* change from PULL to PUSH */
|
||||||
|
gst_pad_activate_push (pad, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
Loading…
Reference in a new issue