summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-04-20 20:22:49 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-04-20 20:22:49 +0000
commit903dedd64f94769a7eda0d4f51ac383aa8b9b39a (patch)
tree81bfde8ea6e4c46eeb0dfaedb5c8ccee483ccd3b /libmpcodecs
parent91a84df7d0b19ca510a78191233f17c2d7691b95 (diff)
downloadmpv-903dedd64f94769a7eda0d4f51ac383aa8b9b39a.tar.bz2
mpv-903dedd64f94769a7eda0d4f51ac383aa8b9b39a.tar.xz
Add workaround for aac-sbr-ffaac-slow.mkv playing to slow with FFmpeg
AAC decoder due to wrong sample rate in container. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31051 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ad_ffmpeg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c
index bf2de83c97..afbbc72396 100644
--- a/libmpcodecs/ad_ffmpeg.c
+++ b/libmpcodecs/ad_ffmpeg.c
@@ -146,6 +146,11 @@ static int init(sh_audio_t *sh_audio)
if(sh_audio->wf){
// If the decoder uses the wrong number of channels all is lost anyway.
// sh_audio->channels=sh_audio->wf->nChannels;
+ if (lavc_context->codec_id == CODEC_ID_AAC &&
+ sh_audio->samplerate == 2*sh_audio->wf->nSamplesPerSec) {
+ mp_msg(MSGT_DECAUDIO, MSGL_WARN,
+ "Ignoring broken container sample rate for ACC with SBR\n");
+ } else
if (sh_audio->wf->nSamplesPerSec)
sh_audio->samplerate=sh_audio->wf->nSamplesPerSec;
if (sh_audio->wf->nAvgBytesPerSec)