From 870ac2a4a3567f0081fe61c68e8b629f0b8b9f8e Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 12 Jun 2004 08:34:22 +0000 Subject: [PATCH] MP3 garbage detection has to use the proper offsets for MP3 header decoding. --- ChangeLog | 6 ++++++ src/input/r_mp3.cpp | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 45ce94c53..cdca33099 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-06-12 Moritz Bunkus + + * mkvmerge: bug fix: The improved MP3 garbage detection was broken + resulting in an error message from mkvmerge in some weird + situations. + 2004-06-08 Moritz Bunkus * mkvmerge: bug fix: Matroska tracks can use lacing (several diff --git a/src/input/r_mp3.cpp b/src/input/r_mp3.cpp index 9c8ba62b8..2cf1511c3 100644 --- a/src/input/r_mp3.cpp +++ b/src/input/r_mp3.cpp @@ -163,7 +163,8 @@ mp3_reader_c::find_valid_headers(mm_io_c *mm_io) { mxverb(2, "mp3_reader: Second header search, second header? %d\n", pos2); if (pos2 < 0) return -1; - decode_mp3_header(&buf[offset + pos + pos2], &mp3header); + decode_mp3_header(&buf[offset + pos + mp3header.framesize + pos2], + &mp3header); mxverb(2, "mp3_reader: Second header search, second header at %d + %d " "(version: %d, layer: %d, sampling freq: %d, channels: %d, " "bitrate: %d)\n", offset + pos, pos2, mp3header.version,