[Bug 729314] ogg: sample-accurate decoding/encoding is broken

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Jun 5 02:57:37 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=729314
  GStreamer | gst-plugins-base | git

Vincent Penquerc'h <vincent.penquerch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1

--- Comment #2 from Vincent Penquerc'h <vincent.penquerch at collabora.co.uk> 2014-06-05 09:57:35 UTC ---
The first bug is kind of shared between oggdemux and vorbisdec.

The sample's last buffer has 1024 samples, but the 160 last ones are clipped.
However, vorbisdec does not know the buffer is the last one, so does not tell
libvorbis about it, so libvorbis does not clip them. GStreamer relies on
segment clipping to clip these samples.

When the segment has an indefinite end, no clipping will occur. When it has,
the sampes will still not be clipped because oggdemux calculates the start time
of the buffer from the end time minus the duration. Since clipped samples are
expressed by the granulepos, this means oggdemux will timestamp the last buffer
as starting before its actual start time, creating both a timestamp
discontinuity and causing those end samples to be not clipped.

The good fix would be to let oggdemux tell vorbisdec a packet is an EOS packet.
It has that information, but it is discarded when pushing packets downstream.
One could use a custom buffer flag, or a GstMeta for this. These would be Ogg
specific I guess, since they are for the e_o_s flag in Ogg packets. Comments on
whether this is acceptable, or if there is another preferred way to convey this
information ?

The second bug I've not looked at yet, but since there is a single sample off,
I reckon it's something scaling and not rounding in vorbisenc.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list