changeset 17279:600d0b740940

"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
author gpoirier
date Sat, 31 Dec 2005 18:56:35 +0000
parents d05606587449
children 19a8d11710ab
files mp3lib/sr1.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);