Workaround: skip first mp3 frame, that mostly contains trashed data. This fixes several buggy/mistdetected files. Idea by Arpi.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10615 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
alex 2003-08-15 12:35:08 +00:00
parent 160d37f149
commit 9c683a0f74
1 changed files with 1 additions and 0 deletions

View File

@ -46,6 +46,7 @@ static int init(sh_audio_t *sh)
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