changeset 10614:d7243684623c

Workaround: skip first mp3 frame, that mostly contains trashed data. This fixes several buggy/mistdetected files. Idea by Arpi.
author alex
date Fri, 15 Aug 2003 12:35:08 +0000
parents 0c226661c02d
children 65226e2ea605
files libmpcodecs/ad_mp3lib.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ad_mp3lib.c	Fri Aug 15 12:09:56 2003 +0000
+++ b/libmpcodecs/ad_mp3lib.c	Fri Aug 15 12:35:08 2003 +0000
@@ -46,6 +46,7 @@
   MP3_Init();
 #endif
   MP3_samplerate=MP3_channels=0;
+  MP3_DecodeFrame(NULL,-2); // FIXME: skip the first frame (often trashed)
   sh->a_buffer_len=MP3_DecodeFrame(sh->a_buffer,-1);
   if(!sh->a_buffer_len) return 0; // unsupported layer/format
   sh->channels=2; // hack