[flac-dev] FLAC__stream_decoder_seek_absolute calling write callback
Erik de Castro Lopo
mle+la at mega-nerd.com
Tue Jan 19 10:58:43 PST 2016
Tamás Zahola wrote:
> Hello,
>
> The API documentation [1] `FLAC__stream_decoder_seek_absolute` says:
>
> "Flush the input and seek to an absolute sample. Decoding will resume
> at the given sample. Note that because of this, the next write
> callback may contain a partial block."
>
> I expected that subsequent `process_single` calls would return data
> starting exactly from the sample I've seeked to. To my surprise
> hovewer it seems that `seek_absolute` implicitly processes the frame
> which contains the requested sample (the write callback receives only
> the tail of the frame from the given sample).
>
> Since the documentation haven't mentioned seek_absolute triggering the
> write callback, my question would be whether this behaviour is
> guaranteed or not? Is seek_absolute guaranteed to implicitly process
> the frame containing the requested sample? (in other worfs: a
> process_single call after a successful seek_absolute call always
> processes the frame _after_ the one contaning the requested sample)
Hi,
Sorry for the tardy response to this. I've now read your email a number of
times and I'm still not sure what needs to be done.
Maybe it would help if you could explain the following:
* What is actually happening.
* What you expect to happen and how that differs from what is happening.
* Propose a fix.
Once thing that may actually help is a small chunk of code demonstrating
the problem.
Cheers,
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
More information about the flac-dev
mailing list