[MPlayer-cvslog] r31051 - trunk/libmpcodecs/ad_ffmpeg.c

reimar subversion at mplayerhq.hu
Tue Apr 20 22:22:50 CEST 2010


Author: reimar
Date: Tue Apr 20 22:22:49 2010
New Revision: 31051

Log:
Add workaround for aac-sbr-ffaac-slow.mkv playing to slow with FFmpeg
AAC decoder due to wrong sample rate in container.

Modified:
   trunk/libmpcodecs/ad_ffmpeg.c

Modified: trunk/libmpcodecs/ad_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/ad_ffmpeg.c	Tue Apr 20 16:47:31 2010	(r31050)
+++ trunk/libmpcodecs/ad_ffmpeg.c	Tue Apr 20 22:22:49 2010	(r31051)
@@ -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)


More information about the MPlayer-cvslog mailing list