summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-08-15 12:35:08 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-08-15 12:35:08 +0000
commit9c683a0f744cfba47daa1f31ec87f14473b5b01b (patch)
tree0e619fd483b55318ff7b829b425ba09286d43907 /libmpcodecs
parent160d37f1494ba5858f3d2157079249fa686000dc (diff)
downloadmpv-9c683a0f744cfba47daa1f31ec87f14473b5b01b.tar.bz2
mpv-9c683a0f744cfba47daa1f31ec87f14473b5b01b.tar.xz
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
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ad_mp3lib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libmpcodecs/ad_mp3lib.c b/libmpcodecs/ad_mp3lib.c
index 0522c16e01..2b4f8c96a2 100644
--- a/libmpcodecs/ad_mp3lib.c
+++ b/libmpcodecs/ad_mp3lib.c
@@ -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