summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/ad_ffmpeg.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-11-16 06:54:22 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-11-16 07:01:46 +0200
commit287b62163eed8811b6cd33716c0691d328947d48 (patch)
tree3143d2cb17b32a19e3e7e0aa428210d1bba3eb0b /libmpcodecs/ad_ffmpeg.c
parent507f4fe6c7811558b1367e4b64855ae7f9bc8da8 (diff)
parentb411278fbb00767b8013604157a43e0203f66f4c (diff)
downloadmpv-287b62163eed8811b6cd33716c0691d328947d48.tar.bz2
mpv-287b62163eed8811b6cd33716c0691d328947d48.tar.xz
Merge svn changes up to r29912
Diffstat (limited to 'libmpcodecs/ad_ffmpeg.c')
-rw-r--r--libmpcodecs/ad_ffmpeg.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c
index fd354f8ba7..8d8c040560 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);