[Flac-dev] Strangeness with OggFlac files

Erik de Castro Lopo erikd-flac at mega-nerd.com
Fri Nov 3 04:10:16 PST 2006


Josh et al,

I've been tracking down a problem with generating OggFlac files.

While investigatint this issue I hacked one of the test files from
the test_libFLAC directory of the flac-1.1.3-beta2. The result of
this hacking is this standalone C file:

    http://www.mega-nerd.com/tmp/erikd_test.c

Directions for compiling this is in the comments at the top of
the file.

When the program is run, it generates 4 files:

    seekable.flac
    stream.flac
    seekable.ogg
    stream.ogg

The problem is that the two OggFlac files are lacking an end-of-stream
marker. For instance, the ogginfo program says: 

    erikd at mingus > ogginfo stream.ogg 
    Processing file "stream.ogg"...
    New logical stream (#1, serial: 00003039): type unknown
    Warning: EOS not set on stream 1

    erikd at mingus > ogginfo seekable.ogg 
    Processing file "seekable.ogg"...
    New logical stream (#1, serial: 00003039): type unknown
    Warning: EOS not set on stream 1

I have looked into this and suspect that the FLAC__stream_encoder_finish()
function needs to finish off the stream using a call to ogg_stream_flush()
instead of the standard function ogg_stream_pageout().

Josh (or anyone), I'd appreciate it if you could take a look at this.

Cheers,
Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo
+-----------------------------------------------------------+
"life is too long to be an expert at harmful things, including 
such evilness as C++ and perl." -- Erik Naggum


More information about the Flac-dev mailing list