GNOME Bugzilla – Bug 511413
make tee prefer higher return values
Last modified: 2008-12-08 21:29:03 UTC
GstTee can currently overwrite GST_FLOW_OK from one element with a GST_FLOW_WRONG_STATE from another, or do the opposite in an unpredictable manner. The accumulator should always go one way, I propose up. Patch attached.
Created attachment 103501 [details] [review] Always have the accumulator for the tee's return value go up
Created attachment 103503 [details] [review] Improved patch I though, well, why not just return the highest error always, instead of special-casing not-linked. So I'm attaching an improved patch.
NOT-LINKED should be returned when all pads are unlinked. OK should be returned when all pads returned OK, any other error value should be passed upstream. I can't quite see how that happens in this patch.
I was hoping to hide wrong-states too. so that one can stop one branch of from the tee without having to block the streaming thread. That's why I did the prefer higher return value.
any chance of having this merged? Or should I have a tee fork for farsight ?
IMHO it makes sense for tee to ignore wrong-state the same way not-linked is ignored, i.e. when at least some pads return ok
Shouldn't this use the same loging like what demuxers use to aggregate flow-returns (like gst_avi_demux_combine_flows).
Can you explain why this is a problem? what does the application do to cause one part to go wrong_state while that is not desirable?
Alright, it seems that I can just release the pad and it will ignore the wrong-state from there afterwards... So lets forget about this bug..