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 311491 - ogg muxer can get pages out of order (patch)
ogg muxer can get pages out of order (patch)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.8.10
Other Linux
: Normal major
: 0.8.11
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-25 14:53 UTC by Michael Smith
Modified: 2005-07-28 09:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix for dealing with ogg pages with negative granulepos (1.58 KB, patch)
2005-07-25 14:55 UTC, Michael Smith
none Details | Review

Description Michael Smith 2005-07-25 14:53:07 UTC
If a page has a granulepos of -1 (indicating that no packets end on it), the ogg
muxer can get some data out of order. This hasn't come up before because a
libogg bug meant that the pages usually didn't have granulepos -1 even when they
should have.

This happens because the muxer selects the logical stream to write data from as
whichever stream has a page with the lowest timestamp. It only does this once
pages are available on queues for all the streams, so that this decision can be
done correctly (unless the stream is at EOS). However, it's actually neccesary
to check that the queues contain a page _with a timestamp_ - requiring some
lookahead. 

I'll shortly attach a patch that fixes this.
Comment 1 Michael Smith 2005-07-25 14:55:36 UTC
Created attachment 49720 [details] [review]
Fix for dealing with ogg pages with negative granulepos
Comment 2 Ronald Bultje 2005-07-27 18:51:39 UTC
So, I'm not sure what all that means, but the patch looks sane, so please go
ahead and apply... Do you have CVS access yet (given that you work at Fluendo
anyway... :) ).
Comment 3 Michael Smith 2005-07-28 08:47:46 UTC
I don't have CVS access at this time. Can you commit for me, please?
Comment 4 Ronald Bultje 2005-07-28 09:16:48 UTC
applied, thanks.

2005-07-28  Michael Smith  <msmith@fluendo.com>

        Reviewed by:  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>

        * ext/ogg/gstoggmux.c: (gst_ogg_mux_dequeue_page):
          Make sure pages are always in the right order, even when there
          is no granulepos on some packets, by using larger lookahead on
          queues until we find a timestamped packet (#311491).