Skip to content

Commit

Permalink
skip FLAC (blocktype) padding
Browse files Browse the repository at this point in the history
  • Loading branch information
schreibfaul1 committed May 18, 2024
1 parent 2b7125c commit 990c14c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/flac_decoder/flac_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ int FLACparseOGG(uint8_t *inbuf, int *bytesLeft){ // reference https://www.xiph

(void)continuedPage; (void)lastPage;

// log_i("firstPage %i, continuedPage %i, lastPage %i", firstPage, continuedPage, lastPage);

if(firstPage) s_flacPageNr = 0;

uint16_t headerSize = pageSegments + 27;
Expand Down Expand Up @@ -387,8 +389,8 @@ int parseMetaDataBlockHeader(uint8_t *inbuf, int16_t nBytes){
break;
case 1:
bt = padding;
log_e("padding");
return ERR_FLAC_UNIMPLEMENTED;
// log_e("padding");
return ERR_FLAC_NONE;
break;
case 2:
bt = application;
Expand Down Expand Up @@ -564,7 +566,7 @@ int parseMetaDataBlockHeader(uint8_t *inbuf, int16_t nBytes){
if(vb[i]){free(vb[i]); vb[i] = NULL;}
}

if(!s_flacBlockPicLen) s_f_lastMetaDataBlock = true; // exeption:: goto audiopage after commemt if lastMetaDataFlag is not set
if(!s_flacBlockPicLen && s_flacSegmTableVec.size() == 1) s_f_lastMetaDataBlock = true; // exeption:: goto audiopage after commemt if lastMetaDataFlag is not set
if(ret == FLAC_PARSE_OGG_DONE) return ret;
break;

Expand Down

0 comments on commit 990c14c

Please sign in to comment.