GNOME Bugzilla – Bug 631389
[flacparse] backport/check corner case fixes done in flacdec
Last modified: 2010-11-17 14:47:35 UTC
I have a vague memory of misc. corner case fixes we've done in flacdec to fix various things. Now that flacparse is autoplugged, we should go through the fixes done to flacdec and make sure they work in flacparse too. IIRC most of those were about figuring out the correct duration in all cases (where header has no duration, where header has wrong duration/file is truncated). Finding the last frame and extracting the sample number from that should do the trick. BaseParse should support that if it doesn't do that already (where that = framed formats that have some sort of timestamp/position marker in the frame header). Should probably also implement seek table support.
Yes, seek table support *must* be implemented before moving flacparse to good and always use it. Otherwise seeking always requires to read the complete file up to the target position. Do you have any details about the other things in flacdec?
AFAIK, not having a seektable need not require reading the whole file (at least if not accurate seeking); an estimate (bitrate-based) seek will be done. I could not (obviously) find other tricks in flacdec, so the following should cover the above (if not, reopen): commit 36cbbd94c614ed2b341e075a5f1d43cb75b884cd Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Tue Nov 16 12:11:53 2010 +0100 flacparse: parse seektable Fixes #631389 (partially). commit 9b6439a36c6d0a19c03adbbed78ebc4f8c949e3c Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Wed Nov 17 14:30:09 2010 +0100 baseparse: enhancements for timestamp marked framed formats That is, as such formats allow subclass to extract position from frame, it is possible to extract duration (if not otherwise provided) from (near) last frame, and a seek can fairly accurately target the required position. Fixes #631389.