Skip to content

Commit

Permalink
better mad sync
Browse files Browse the repository at this point in the history
  • Loading branch information
philippe44 committed Aug 27, 2020
1 parent d2ca0b3 commit 7f67190
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/squeezelite/mad.c
Expand Up @@ -243,6 +243,8 @@ static decode_state mad_decode(void) {
MAD(m, synth_frame, &m->synth, &m->frame);

if (decode.new_stream) {
// seems that mad can use some help in term of sync detection
if (m->stream.next_frame[0] != 0xff || (m->stream.next_frame[1] & 0xf0) != 0xf0) continue;
LOCK_O;
LOG_INFO("setting track_start");
output.next_sample_rate = decode_newstream(m->synth.pcm.samplerate, output.supported_rates);
Expand Down

0 comments on commit 7f67190

Please sign in to comment.