diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2008-10-14 12:34:56 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2008-10-14 12:34:56 +0000 |
commit | 075811e6542275f3066fa51147c52c3ae5e9dae8 (patch) | |
tree | 12723bb5d83aa6ed03510275eac104274bae09f6 /plugins | |
parent | 97ec47cabb1eb2280cf14f334f4264d5cb7e6a88 (diff) | |
download | gstreamer-075811e6542275f3066fa51147c52c3ae5e9dae8.tar.gz |
plugins/elements/gsttee.c: Fix flow aggregation of tee. Error out immediately for all flow returns except OK and NOT_...
Original commit message from CVS:
* plugins/elements/gsttee.c: (gst_tee_handle_buffer):
Fix flow aggregation of tee. Error out immediately for all flow returns
except OK and NOT_LINKED, return NOT_LINKED if all pads are not linked
and return OK if at least one pad is linked.
Before we errored out on "fatal" flow returns (i.e. not for WRONG_STATE)
and otherwise returned the flow return of the last pad, which is wrong.
* tests/check/elements/tee.c: (_fake_chain), (_fake_chain_error),
(GST_START_TEST), (tee_suite):
Add unit tests for the flow aggregation.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/elements/gsttee.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c index a689fc6f52..c160de3366 100644 --- a/plugins/elements/gsttee.c +++ b/plugins/elements/gsttee.c @@ -594,13 +594,14 @@ restart: gst_flow_get_name (ret)); } /* stop pushing more buffers when we have a fatal error */ - if (GST_FLOW_IS_FATAL (ret)) + if (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_LINKED) goto error; - /* keep all other return values, overwriting the previous one */ - GST_LOG_OBJECT (tee, "Replacing ret val %d with %d", cret, ret); - if (cret == GST_FLOW_NOT_LINKED) + /* keep all other return values, overwriting the previous one. */ + if (ret != GST_FLOW_NOT_LINKED) { + GST_LOG_OBJECT (tee, "Replacing ret val %d with %d", cret, ret); cret = ret; + } if (GST_ELEMENT_CAST (tee)->pads_cookie != cookie) { GST_LOG_OBJECT (tee, "pad list changed"); |