diff options
author | tack <tack@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-11-04 00:54:46 +0000 |
---|---|---|
committer | tack <tack@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-11-04 00:54:46 +0000 |
commit | b88d08040e365295fe9bf4ff717fdb1d728fe87b (patch) | |
tree | cb9aa870ce5c51bc2ff8ebae105ac3cc825086a5 /libmpcodecs | |
parent | fe57d3e844a277b8c15592489b4d1071120f5565 (diff) | |
download | mpv-b88d08040e365295fe9bf4ff717fdb1d728fe87b.tar.bz2 mpv-b88d08040e365295fe9bf4ff717fdb1d728fe87b.tar.xz |
ad_ffmpeg: Fix channel layout for ffvorbis and ffaac
Patch submitted by Nicolas George, nicolas.george normalesup org
The layout exceptions removed by this patch were rendered unnecessary by
changes in ffmpeg which normalize channel layout for aac (r20067) and vorbis
(r20148).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29821 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/ad_ffmpeg.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c index a997fbe245..bbaa316b4f 100644 --- a/libmpcodecs/ad_ffmpeg.c +++ b/libmpcodecs/ad_ffmpeg.c @@ -177,17 +177,10 @@ static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int m if(y<x) sh_audio->ds->buffer_pos+=y-x; // put back data (HACK!) if(len2>0){ if (((AVCodecContext *)sh_audio->context)->channels >= 5) { - int src_ch_layout = AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT; int samplesize = av_get_bits_per_sample_format(((AVCodecContext *) sh_audio->context)->sample_fmt) / 8; const char *codec=((AVCodecContext*)sh_audio->context)->codec->name; - if (!strcasecmp(codec, "aac")) - src_ch_layout = AF_CHANNEL_LAYOUT_LAVC_AAC_DEC_DEFAULT; - else if (!strcasecmp(codec, "vorbis")) - src_ch_layout = AF_CHANNEL_LAYOUT_VORBIS_DEFAULT; - else - src_ch_layout = AF_CHANNEL_LAYOUT_LAVC_DEFAULT; - reorder_channel_nch(buf, src_ch_layout, + reorder_channel_nch(buf, AF_CHANNEL_LAYOUT_LAVC_DEFAULT, AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT, ((AVCodecContext *)sh_audio->context)->channels, len2 / samplesize, samplesize); |