[Bug 651615] ogg vorbis files transcoded by apps won't play in Android

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Aug 9 01:28:48 PDT 2011


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

xiphmont <xiphmont> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xiphmont at gmail.com

--- Comment #7 from xiphmont <xiphmont at gmail.com> 2011-08-09 08:28:44 UTC ---
This looks like the same bug as Fedora bug #722667 (redhat bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=722667).  That bug has a test case
and patches.  I'm duplicating my comments and patchs here:

It is a combination of a bug in gstflacdec and a bad decision in gstvorbisenc.

gstflacdec is converting input buffer timestamp to sample number, using that
internally, then converting sample number back to timestamp for the output
buffer.  Unfortunately, it's using gst_util_uint64_scale_int to convert
timestamp to sample number (which always rounds by truncating) and since sample
numbers aren't usually expressible in an integer number of nanoseconds, the
output buffer timestamp is off by a full sample about half the time.

gstvorbisenc, on the other side, is hardwired to tolerate only a half-sample of
jitter in the input buffer; if it sees more, it treats the input as a
discontinuous stream and resets the encode process.  If time 'went backwards'
due to jittering back a sample, it truncates the buffer as well.

The combination of these two behaviors is obviously catastrophic to
FLAC->Vorbis transcodes, and worse, the corruption happens without any warning
whatsoever.

proposed patch 1/2:

Patch to the vorbis encoder element to relax jitter action threshold from .5
samples to 3 samples.

proposed patch 2/2:

corrects the bug in flacdec that was causing a full sample of timestamp jitter

The patches are tested here; either one fixes the specific reported bug.  The
flacdec patch is for a real bug obviously, and I think the vorbisenc patch
should be put in place to back away a bit from a potentially bad design
decision.  I'm not sure what the vorbisenc code thinks it's doing with respect
to discontinuous streams, but I am sure it should not be mistriggering on
inputs with very minor timestamp jitter.

-- 
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