Mercurial > mplayer.hg
comparison libmpcodecs/ad_mp3lib.c @ 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 | b465ba5897a3 |
children | 9d0b052c4f74 |
comparison
equal
deleted
inserted
replaced
10613:0c226661c02d | 10614:d7243684623c |
---|---|
44 MP3_Init(fakemono); | 44 MP3_Init(fakemono); |
45 #else | 45 #else |
46 MP3_Init(); | 46 MP3_Init(); |
47 #endif | 47 #endif |
48 MP3_samplerate=MP3_channels=0; | 48 MP3_samplerate=MP3_channels=0; |
49 MP3_DecodeFrame(NULL,-2); // FIXME: skip the first frame (often trashed) | |
49 sh->a_buffer_len=MP3_DecodeFrame(sh->a_buffer,-1); | 50 sh->a_buffer_len=MP3_DecodeFrame(sh->a_buffer,-1); |
50 if(!sh->a_buffer_len) return 0; // unsupported layer/format | 51 if(!sh->a_buffer_len) return 0; // unsupported layer/format |
51 sh->channels=2; // hack | 52 sh->channels=2; // hack |
52 sh->samplerate=MP3_samplerate; | 53 sh->samplerate=MP3_samplerate; |
53 sh->i_bps=MP3_bitrate*(1000/8); | 54 sh->i_bps=MP3_bitrate*(1000/8); |