GNOME Bugzilla – Bug 709637
oggmux: Make sure we end up sending EOS if we received EOS on all sinkpads
Last modified: 2013-10-10 22:12:49 UTC
In the case we receive EOS on all our pads, we finnished to mux all buffers for one pad but still have some collected on another, we end up with collectpad set to all EOS, so it will not call ->collected anymore as it is EOS, and we will not push our EOS ourself as we know there is still some data in. In that case we should make sure our collected function is called recursively until everything is actually EOS.
Created attachment 256730 [details] [review] oggmux: Make sure we end up sending EOS if we received EOS on all sinkpads
Can't you just return GST_FLOW_OK from the collected function? GstCollectPads should call the collected function as long as there are buffers queued.
Comment on attachment 256730 [details] [review] oggmux: Make sure we end up sending EOS if we received EOS on all sinkpads Otherwise this patch is of course correct. But it should really be handled in collectpads, or maybe the EOS handling in oggmux is a bit weird
Created attachment 256849 [details] [review] collectpads: Call the collected function while it returns FLOW_OK This allows us to make sure the elements is EOS and does not have remaining buffers to be drained. This is an alternative solution, might indeed be better.
Created attachment 256850 [details] [review] Alternative patch in collectpads Indeed that probably makes more sense.
Erm, no :) Only call it as long as not all pads are EOS or pads still have data queued. That change there is calling for infinite loops ;)
Comment on attachment 256850 [details] [review] Alternative patch in collectpads Sorry for the duplication, git-bz told me there had been an issue sending the previous patch.
commit 0564c1c2b8ad274692ba8358e27fcf00a3b10ce3 Author: Thibault Saunier <thibault.saunier@collabora.com> Date: Wed Oct 9 15:36:48 2013 -0300 collectpads: Call the collected function while it returns FLOW_OK This allows us to make sure the elements is EOS and does not have remaining buffers to be drained. https://bugzilla.gnome.org/show_bug.cgi?id=709637
And I have to say that commit message first line is clearly missing the fact that we do it *when* collectpads is EOS itself!