mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
tee: Properly handle return value when only 1 pad
This patch handle the case when you have 1 pad (so the fast path is being used) but this pad is removed. If we are in allow-not-linked, we should return GST_FLOW_OK, otherwise, we should return GST_FLOW_UNLINKED and ignore the meaningless return value obtained from pushing. https://bugzilla.gnome.org/show_bug.cgi?id=767413
This commit is contained in:
parent
ba536c2307
commit
046551105b
1 changed files with 4 additions and 1 deletions
|
@ -656,12 +656,15 @@ gst_tee_handle_data (GstTee * tee, gpointer data, gboolean is_list)
|
|||
ret = gst_pad_push (pad, GST_BUFFER_CAST (data));
|
||||
}
|
||||
|
||||
gst_object_unref (pad);
|
||||
if (GST_TEE_PAD_CAST (pad)->removed)
|
||||
ret = GST_FLOW_NOT_LINKED;
|
||||
|
||||
if (ret == GST_FLOW_NOT_LINKED && tee->allow_not_linked) {
|
||||
ret = GST_FLOW_OK;
|
||||
}
|
||||
|
||||
gst_object_unref (pad);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue