[MPlayer-cvslog] CVS: main/mp3lib sr1.c,1.33,1.34

Guillaume Poirier CVS syncmail at mplayerhq.hu
Sat Dec 31 19:56:38 CET 2005


CVS change done by Guillaume Poirier CVS

Update of /cvsroot/mplayer/main/mp3lib
In directory mail:/var2/tmp/cvs-serv74/mp3lib

Modified Files:
	sr1.c 
Log Message:
"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

Index: sr1.c
===================================================================
RCS file: /cvsroot/mplayer/main/mp3lib/sr1.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- sr1.c	15 Nov 2005 18:14:07 -0000	1.33
+++ sr1.c	31 Dec 2005 18:56:35 -0000	1.34
@@ -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);
 




More information about the MPlayer-cvslog mailing list