mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
audiodecoder: make upstream queries and events MT-safe
This commit is contained in:
parent
f3cb93fc0c
commit
77069f01b1
1 changed files with 7 additions and 0 deletions
|
@ -1556,6 +1556,10 @@ gst_audio_decoder_src_event (GstPad * pad, GstEvent * event)
|
|||
gboolean res = FALSE;
|
||||
|
||||
dec = GST_AUDIO_DECODER (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (dec == NULL)) {
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (dec, "received event %d, %s", GST_EVENT_TYPE (event),
|
||||
GST_EVENT_TYPE_NAME (event));
|
||||
|
@ -1754,6 +1758,9 @@ gst_audio_decoder_src_query (GstPad * pad, GstQuery * query)
|
|||
gboolean res = FALSE;
|
||||
|
||||
dec = GST_AUDIO_DECODER (GST_PAD_PARENT (pad));
|
||||
if (G_UNLIKELY (dec == NULL))
|
||||
return FALSE;
|
||||
|
||||
peerpad = gst_pad_get_peer (GST_PAD (dec->sinkpad));
|
||||
|
||||
GST_LOG_OBJECT (dec, "handling query: %" GST_PTR_FORMAT, query);
|
||||
|
|
Loading…
Reference in a new issue