Skip to content

Commit

Permalink
Fix decoder not able to find start of next link (#771)
Browse files Browse the repository at this point in the history
See #765 for report.
  • Loading branch information
ktmf01 authored Dec 5, 2024
1 parent d1d72aa commit 301f655
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/libFLAC/ogg_decoder_aspect.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,6 @@ FLAC__OggDecoderAspectReadStatus FLAC__ogg_decoder_aspect_skip_link(FLAC__OggDec
}
}
else { /* aspect->beginning_of_link == true */
/* Didn't seek, so move up left_pos */
left_pos = current_pos;
if(aspect->end_of_stream) {
if(aspect->current_linknumber == 0)
return FLAC__OGG_DECODER_ASPECT_READ_STATUS_LOST_SYNC;
Expand All @@ -682,6 +680,10 @@ FLAC__OggDecoderAspectReadStatus FLAC__ogg_decoder_aspect_skip_link(FLAC__OggDec
}
find_bos_twice = false;
}
if(!aspect->beginning_of_link) {
/* Done scanning BOS pages, move up left_pos */
left_pos = page_pos;
}
}
}
}
Expand Down

0 comments on commit 301f655

Please sign in to comment.