mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
tee: Don't crash if there is no source pad
This commit is contained in:
parent
12247a9f9b
commit
3144354aae
1 changed files with 10 additions and 0 deletions
|
@ -664,6 +664,16 @@ gst_tee_handle_data (GstTee * tee, gpointer data, gboolean is_list)
|
||||||
GST_OBJECT_LOCK (tee);
|
GST_OBJECT_LOCK (tee);
|
||||||
pads = GST_ELEMENT_CAST (tee)->srcpads;
|
pads = GST_ELEMENT_CAST (tee)->srcpads;
|
||||||
|
|
||||||
|
/* special case for zero pads */
|
||||||
|
if (!pads) {
|
||||||
|
GST_OBJECT_UNLOCK (tee);
|
||||||
|
if (is_list)
|
||||||
|
gst_buffer_list_unref (data);
|
||||||
|
else
|
||||||
|
gst_buffer_unref (data);
|
||||||
|
return GST_FLOW_NOT_LINKED;
|
||||||
|
}
|
||||||
|
|
||||||
/* special case for just one pad that avoids reffing the buffer */
|
/* special case for just one pad that avoids reffing the buffer */
|
||||||
if (!pads->next) {
|
if (!pads->next) {
|
||||||
GstPad *pad = GST_PAD_CAST (pads->data);
|
GstPad *pad = GST_PAD_CAST (pads->data);
|
||||||
|
|
Loading…
Reference in a new issue