Displaying 3 results from an estimated 3 matches for "header_warmup".
2008 Nov 06
2
libFLAC header checking
In stream_decoder.c function find_metadata_() checks whether a file is
valid or not. There are 4 cases it recognizes:
1) file begins with 'fLaC'
2) file begins with ID3 (skipped), followed by 'fLaC'
3) file may begin with 11111111 111110?? sync code (or 11111111111110,
depends on endianess i suppose). That is - a raw file with FLAC frames,
without header (right?).
4) file begins
2008 Dec 10
0
libFLAC header checking
...be 00 (first 0 is from magic number second 0 is from
reserved bit that should always be 0)
In MP3 it must not be 00 (00 is reserved).
Suggested code change is
from:
else if(x >> 2 == 0x3e) { /* MAGIC NUMBER for the last 6
sync bits */
decoder->private_->header_warmup[1] = (FLAC__byte)x;
decoder->protected_->state =
FLAC__STREAM_DECODER_READ_FRAME;
return true;
}
to
else if(x >> 1 == 0x7c) { /* MAGIC NUMBER for the last 6
sync bits and reserved 7th bit*/
decoder->privat...
2004 Sep 10
2
possible bug in process_metadata()
...ck).
It would be nice if someone could tell me if I'm doing
something wrong or if that's a bug in libFLAC 1.02.
BTW - stream_decoder_find_metadata() returns because this
condition is true:
else if(x >> 2 == 0x3e) { /* MAGIC NUMBER for the last 6 sync bits */
decoder->private_->header_warmup[1] = (FLAC__byte)x;
decoder->protected_->state = FLAC__STREAM_DECODER_READ_FRAME;
return true;
process_metadata() then breaks out of the while() loop because
of this condition:
case FLAC__STREAM_DECODER_READ_FRAME:
return true;
BTW2 - the errorCallback() is called once during process_me...