[Bug 650960] flacparse makes decoded flac files start at sample offset 9215

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Aug 17 06:26:55 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=650960
  GStreamer | gst-plugins-good | 0.10.29

--- Comment #7 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2011-08-17 13:26:47 UTC ---
Pushed these:


commit 3e0134f51fe174a1c68422b55147b2f2a2b07373
Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Tue Aug 16 17:27:13 2011 +0100

    flacdec: avoid timestamp/offset tracking going out of sync

    The libFLAC API is callback based, and we must only call it to
    output data when we know we have enough input data. For this
    reason, a single processing step is done when receiving a buffer.
    However, if there were metadata buffers still pending, a step
    intended for the first audio frame might end up writing that
    leftover metadata. Since a single step is done per buffer, this
    will cause every buffer to be written one step late.

    This would add some latency (a bufferfull's worth), possibly
    lose a buffer when seeking or the like, and also cause timestamp
    and offset to be applied to the wrong buffer, as updates to
    the "current" segment last_stop (from incoming buffer timestamp)
    will be applied to an output buffer originating from the previous
    incoming buffer.

    This fixes the issue by ensuring that, upon receiving the first
    audio frame, processing is done till all metadata is processed,
    so the next "single step" done will be for the audio frame. After
    this, we should keep to 1 input buffer -> 1 output buffer and so
    avoid getting out of sync.

    https://bugzilla.gnome.org/show_bug.cgi?id=650960

commit e09eb95a5fd46bcbf3088dbdff780a4adebb0a75
Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Tue Aug 16 15:32:07 2011 +0100

    flacdec: bail on reserved value

    Now that we look at the right bits, we can test against the reserved
    value as we do for other fields.

    https://bugzilla.gnome.org/show_bug.cgi?id=650960

commit 64beef46101b023ca4f052c769ce9b0280ca9dcc
Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Tue Aug 16 15:27:43 2011 +0100

    flacdec: fix bit twiddling

    Right shifting a 8 bit value by 8 bits is twice too much
    to get the high 4 bits.

    https://bugzilla.gnome.org/show_bug.cgi?id=650960

commit 1549aaba2749f9b8a2fc9e56c849c69a8107098f
Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Tue Aug 16 15:22:46 2011 +0100

    flacdec: warn if we see a variable block size where unsupported

    https://bugzilla.gnome.org/show_bug.cgi?id=650960


Went for the non-GST_ELEMENT_ERROR variant after all, because we may just be
dealing with a bad syncpoint, where we don't want to error out.

There's still an off-by-one error though, check the offset of the second buffer
flacdec outputs, it's 1 too small. This may be because of an off-by-one or
because we do calculations with GST_CLOCK_TIME_NONE somewhere.

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


More information about the gstreamer-bugs mailing list