From 7a10c2e69f1d8efd88484c46ff49038add4b99a3 Mon Sep 17 00:00:00 2001 From: Johannes Schriewer Date: Mon, 4 Mar 2024 01:20:50 +0100 Subject: [PATCH] Remove dead code --- audio/deps/mp3/frame.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/audio/deps/mp3/frame.c b/audio/deps/mp3/frame.c index d1bae85..49272ea 100644 --- a/audio/deps/mp3/frame.c +++ b/audio/deps/mp3/frame.c @@ -314,7 +314,6 @@ int mad_header_decode(struct mad_header *header, struct mad_stream *stream) { stream->sync = 1; } -sync: /* synchronize */ if (stream->sync) { if (end - ptr < MAD_BUFFER_GUARD) { @@ -381,27 +380,6 @@ sync: header->frame_size_bytes = N - 4; stream->next_frame = stream->this_frame + N; -#if 0 - /* verify there is enough data left in buffer to decode this frame */ - if (N + MAD_BUFFER_GUARD > end - stream->this_frame) { - stream->next_frame = stream->this_frame; - - stream->error = MAD_ERROR_BUFLEN; - goto fail; - } - - if (!stream->sync) { - /* check that a valid frame header follows this frame */ - - ptr = stream->next_frame; - if (!(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) { - ptr = stream->next_frame = stream->this_frame + 1; - goto sync; - } - - stream->sync = 1; - } -#endif header->flags |= MAD_FLAG_INCOMPLETE; return 0;