# HG changeset patch # User gpoirier # Date 1136055395 0 # Node ID 600d0b7409408ce6020406392f8e74677dd31c37 # Parent d056065874491f0d6b80656b9dc4213d2260b359 "Currently mplayer looks for only one MP3 frame sync. The attached patch makes it to look for two consecutive valid MP3 frame headers, reducing the probability of false positives, which causes Bug 380. Funny that the fix is so simple. Seems that someone has forgotten to initialize MP3_resync correctly. Also this is the recommended way to sync MP3 frames. See http://www.dv.co.yu/mpgscript/mpeghdr.htm. " Original thread: Date: Dec 31, 2005 10:15 AM Subject: [MPlayer-dev-eng] [PATCH] Try twice when searching for MP3 frame header, fixes Bug 380 diff -r d05606587449 -r 600d0b740940 mp3lib/sr1.c --- a/mp3lib/sr1.c Sat Dec 31 18:24:00 2005 +0000 +++ b/mp3lib/sr1.c Sat Dec 31 18:56:35 2005 +0000 @@ -45,7 +45,7 @@ int MP3_framesize=0; // current framesize int MP3_bitrate=0; // current bitrate int MP3_samplerate=0; // current samplerate -int MP3_resync=0; +static int MP3_resync; int MP3_channels=0; int MP3_bps=2; @@ -407,6 +407,7 @@ _has_mmx = 0; dct36_func = dct36; + MP3_resync = 1; make_decode_tables(outscale);