[Flac-dev] problem with seek_absolute in libFLAC++

David Collett jg at webone.com.au
Wed Jun 19 17:28:05 PDT 2002

Nevermind, I have discovered the problem(not really a problem).
I had called:
because I didnt actually need to use the metadata in my application.
But it seems that with this option set, "total_samples" is not set 
correctly after calling init().

Upon further debugging, I discovered that the test "sample < 
total_samples" was what is failing in the seek routine. By removing the 
call to set_metadata_ignore_all() the problem has disapeared.

Sorry this is a rushed explanation, I have to go now and wont be on a PC 
until saturday, better this that you thinking there is a real problem!

Thanks for you quick response,

Josh Coalson wrote:

>--- David Collett <jg at webone.com.au> wrote:
>>I have been changing my (C++)program over to the new FLAC++ API which
>>has gone relatively smoothly.
>>However, the function seek_absolute() (from the FLAC::Decoder::File 
>>class) does not seem to work. It always returns false and doesnt seek
>>all. Using gdb, I have narrowed down the problem somewhat, but being
>>novice programmer that I am, I still don't know whats wrong.
>>When I call the seek_absolute() function eg.
>>and step inside it with gdb, then print the value of "sample" (the 
>>arguement), it is NOT 3561525, rather it is some huge number like 
>> 4621539102901141517.
>>I figure it could be something to do with types or something, 
>>seek_absolute expects a FLAC__uint64, I have tried a few things along
>>this line without success eg.
>>FLAC__uint64 seekpos = 3561525;
>>doesn't work either.
>>Does anyone know what this problem is, or has anyone else had problem
>>with seek_absolute of the C++ File decoder class ??
>hmm... did the unit tests pass?  they do seek_absolute
>calls and fail if they return false.  does the C version
>work?  because the C++ method just calls the C function
>anyway, I'll look into it too.
>Do You Yahoo!?
>Yahoo! - Official partner of 2002 FIFA World Cup

More information about the Flac-dev mailing list