Commit 77069f01 authored by Mark Nauwelaerts's avatar Mark Nauwelaerts

audiodecoder: make upstream queries and events MT-safe

parent f3cb93fc
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment