[Vorbis] Bug in ogg123 playback of OggFLAC files?
Josh Coalson
j_coalson at yahoo.com
Fri Dec 3 08:34:27 PST 2004
--- Barry Bouwsma <bugs at remove-NOSPAM-to-reply.NOSPAM.dyndns.dk> wrote:
> I used a recent ogg123 to play back a FLAC file I had created,
> and saw it wasn't able to seek within the file. So, I thought
> to myself, why not try out an OggFLAC file, so I created one,
> using `flac --ogg', rather than oggenc or something else.
>
> That ogg123 wasn't able to recognize the file as something it
> should have been able to chew on. So I dirtied myself in the
> source code and found the following:
>
> if (len >= 32 && memcmp(buf, "OggS", 4) == 0
> && memcmp(buf+28, "fLaC", 4) == 0)
> return 1; /* Ogg FLAC */
>
> Hmmm. That's sorta like my fresh file from somewhat recent
> source, but not quite:
> 00000000 4f 67 67 53 00 02 00 00 00 00 00 00 00 00 3d 59
> |OggS..........=Y|
> 00000010 81 7a 00 00 00 00 31 e3 96 a9 01 30 46 4c 41 43
> |.z....1....0FLAC|
> 00000020 01 00 66 4c 61 43 00 00 00 22 12 00 12 00 00 00
> |..fLaC..."......|
>
> Should the second line from the above code be a comparison
> against the string "FLAC" instead, or should the "fLaC"
> comparison be at position 34?
>
> Changing the code to compare with "FLAC" results in a
> binary that can play my OggFLAC file, whee. But I still
> can't seek. The reason became clear when looking further
> through the code...
> return 0; /* No seeking at this time */
> Whoops, bummer.
>
> Out of curiosity, how easy should it be to implement
> seeking within an OggFLAC file, as opposed to a plain
> ordinary FLAC file?
seeking was not supporting in libOggFLAC until FLAC 1.1.1
also in FLAC 1.1.1 is the first official (i.e. correct)
FLAC->Ogg mapping. for more info about the history of it
see
http://flac.sourceforge.net/ogg_mapping.html
that might explain some of the problems.
Josh
__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
More information about the Vorbis
mailing list