plugins/elements/gsttee.c: Apply patch from #328715. Tee now handles pad being NOT_LINKED or in WRONG_STATE.

Original commit message from CVS:
2006-01-26  Julien MOUTTE  <julien@moutte.net>

* plugins/elements/gsttee.c: (gst_tee_do_push),
(gst_tee_handle_buffer): Apply patch from #328715. Tee now
handles pad being NOT_LINKED or in WRONG_STATE.
This commit is contained in:
Julien Moutte 2006-01-26 12:40:17 +00:00
parent 9da0074030
commit 41a718c171
2 changed files with 15 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2006-01-26 Julien MOUTTE <julien@moutte.net>
* plugins/elements/gsttee.c: (gst_tee_do_push),
(gst_tee_handle_buffer): Apply patch from #328715. Tee now
handles pad being NOT_LINKED or in WRONG_STATE.
2006-01-26 Stefan Kost <ensonic@users.sf.net>
* win32/MANIFEST:

View file

@ -278,12 +278,18 @@ gst_tee_do_push (GstPad * pad, GValue * ret, PushData * data)
g_object_notify (G_OBJECT (tee), "last_message");
}
/* Push */
res = gst_pad_push (pad, gst_buffer_ref (data->buffer));
g_value_set_enum (ret, res);
/* If it's fatal or OK we overwrite the previous value */
if (GST_FLOW_IS_FATAL (res) || (res == GST_FLOW_OK)) {
g_value_set_enum (ret, res);
}
gst_object_unref (pad);
return (res == GST_FLOW_OK);
/* Stop iterating if flow return is fatal */
return (!GST_FLOW_IS_FATAL (res));
}
static GstFlowReturn
@ -297,6 +303,7 @@ gst_tee_handle_buffer (GstTee * tee, GstBuffer * buffer)
tee->offset += GST_BUFFER_SIZE (buffer);
g_value_init (&ret, GST_TYPE_FLOW_RETURN);
g_value_set_enum (&ret, GST_FLOW_NOT_LINKED);
iter = gst_element_iterate_src_pads (GST_ELEMENT (tee));
data.tee = tee;
data.buffer = buffer;