GNOME Bugzilla – Bug 670850
collectpads2 port of adder has a regression for buzztard
Last modified: 2012-02-28 20:05:31 UTC
Having a simple song like: src ! fx ! sink src ! sink does not play anymore. After a git revert -n 85c10b0 1da30ad bcaf589 a3c5abf it works again. The above is more complex that it looks. In buzztard src, fx and sink are bins with additional volume and level elements. src ends on a tee, fx has an adder at the begin and tee at the end and sink begins with an adder. Each link (!) is a bin as well, consisting of queue , volume, panorama and audioconvert elements. I am attaching a pipeline dump. It can be reproduced by buzztard-cmd -c play -i collectpads2bug.bzt buzztard-edit -c load -i collectpads2bug.bzt (and then pressing play). The released 0.6'er version should do.
Created attachment 208454 [details] the pipeline dump One can see that the src pad of the most downstream adder is not negotiated. How this is caused by the collectpads transition is not clear to me as neither collectpads nor collectpads2 do anything with caps.
Created attachment 208455 [details] buzztard song to reproduce the bug
The issue is that some pads are left flushing.
git bisect start gst/adder git bisect good 14644457b06f48b26f32f88ef91e1286a48ebe24 git bisect bad origin/master Bisecting: 2 revisions left to test after this (roughly 1 step) [bcaf5890aa6eb1c4a18b8dd71eacb22aadba0ead] adder: send a flush event before trying to get the stream lock git bisect good Bisecting: 0 revisions left to test after this (roughly 1 step) [85c10b0b24a58c1b5ec9aa05ea4ffa98ba99ed76] adder: do not send too many flush-stop events git bisect bad Bisecting: 0 revisions left to test after this (roughly 0 steps) [1da30adc1aeafd36b15b8d083fe2178524619479] adder: use the stream lock where appropriate git bisect good 85c10b0b24a58c1b5ec9aa05ea4ffa98ba99ed76 is the first bad commit commit 85c10b0b24a58c1b5ec9aa05ea4ffa98ba99ed76 Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Fri Dec 16 17:32:41 2011 +0000 adder: do not send too many flush-stop events GstCollectPads2 now allows us to override the event function, so we can withhold flush stop events if none are to be sent. https://bugzilla.gnome.org/show_bug.cgi?id=666379 :040000 040000 da80620b5dfd1bdde682e232755382e98f87913a c8ec51e6b51c268e764184cdff45d304fc629eea M gst and indeed just git revert -n 85c10b0 make it work again.
Created attachment 208480 [details] [review] WIP patch, not yet fixing the problem
commit ce1b1d82e34b5ee9eaf6ab979799e52c6d558929 Author: Stefan Sauer <ensonic@users.sf.net> Date: Mon Feb 27 11:57:55 2012 +0100 adder: sink event handling fix Turn _sink_event() into the collectpads event function and merge the logic from the recently added gst_adder_event. Drop flush_start events as we allready handle them on the src-pad side. Fixes #670850.