After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 709637 - oggmux: Make sure we end up sending EOS if we received EOS on all sinkpads
oggmux: Make sure we end up sending EOS if we received EOS on all sinkpads
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other All
: Normal normal
: 1.2.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-10-08 12:44 UTC by Thibault Saunier
Modified: 2013-10-10 22:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
oggmux: Make sure we end up sending EOS if we received EOS on all sinkpads (2.81 KB, patch)
2013-10-08 12:44 UTC, Thibault Saunier
reviewed Details | Review
collectpads: Call the collected function while it returns FLOW_OK (1.05 KB, patch)
2013-10-09 18:40 UTC, Thibault Saunier
needs-work Details | Review
Alternative patch in collectpads (1.06 KB, patch)
2013-10-09 18:47 UTC, Thibault Saunier
needs-work Details | Review

Description Thibault Saunier 2013-10-08 12:44:20 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.
Comment 1 Thibault Saunier 2013-10-08 12:44:23 UTC
Created attachment 256730 [details] [review]
oggmux: Make sure we end up sending EOS if we received EOS on all sinkpads
Comment 2 Sebastian Dröge (slomo) 2013-10-09 17:14:54 UTC
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 3 Sebastian Dröge (slomo) 2013-10-09 17:15:34 UTC
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
Comment 4 Thibault Saunier 2013-10-09 18:40:21 UTC
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.
Comment 5 Thibault Saunier 2013-10-09 18:47:19 UTC
Created attachment 256850 [details] [review]
Alternative patch in collectpads

Indeed that probably makes more sense.
Comment 6 Sebastian Dröge (slomo) 2013-10-09 18:49:27 UTC
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 7 Thibault Saunier 2013-10-09 18:52:28 UTC
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.
Comment 8 Thibault Saunier 2013-10-09 23:31:30 UTC
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
Comment 9 Thibault Saunier 2013-10-10 22:12:49 UTC
And I have to say that commit message first line is clearly missing the fact that we do it *when* collectpads is EOS itself!