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

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Aug 16 09:38:39 PDT 2011


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

--- Comment #5 from Vincent Penquerc'h <vincent.penquerch at collabora.co.uk> 2011-08-16 16:38:36 UTC ---
Created an attachment (id=193975)
 View: https://bugzilla.gnome.org/attachment.cgi?id=193975
 Review: https://bugzilla.gnome.org/review?bug=650960&attachment=193975

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.

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