Implement auto_calc_flac() -- calculate granulepos for flac packets (if
granulepos is not given in Ogg framing). This tracks the current granulepos and determines the block size by reading the FLAC frame header. Note that this patch doesn't handle blocksize codes 0000, 0110 or 0111, which require poking elsewhere to get the actual value. Nevertheless this patch appears to handle the common case framing, and in any case it is very rare for Ogg FLAC packets to not have a granulepos. * Handles both old-style Ogg Flac framing ("Flac0") and current framing * Tested on all flac-in-ogg files from MPlayer samples: http://www1.mplayerhq.hu/MPlayer/samples/ogg/flac-in-ogg/ * Tested with valgrind --leakcheck=yes on src/examples/read-file (no leaks) git-svn-id: http://svn.annodex.net/liboggz/trunk@2573 8158c8cd-e7e1-0310-9fa4-c5954c97daef
Showing
Please register or sign in to comment