Commit 0c4552e3 authored by kostya's avatar kostya

Add channel layout to several audio decoders I maintain

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15884 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 128f11fc
...@@ -199,6 +199,7 @@ static av_cold int ape_decode_init(AVCodecContext * avctx) ...@@ -199,6 +199,7 @@ static av_cold int ape_decode_init(AVCodecContext * avctx)
dsputil_init(&s->dsp, avctx); dsputil_init(&s->dsp, avctx);
avctx->sample_fmt = SAMPLE_FMT_S16; avctx->sample_fmt = SAMPLE_FMT_S16;
avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
return 0; return 0;
} }
......
...@@ -109,6 +109,7 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx) ...@@ -109,6 +109,7 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx)
} }
vlc_initialized = 1; vlc_initialized = 1;
avctx->sample_fmt = SAMPLE_FMT_S16; avctx->sample_fmt = SAMPLE_FMT_S16;
avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
return 0; return 0;
} }
......
...@@ -178,6 +178,7 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx) ...@@ -178,6 +178,7 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx)
} }
vlc_initialized = 1; vlc_initialized = 1;
avctx->sample_fmt = SAMPLE_FMT_S16; avctx->sample_fmt = SAMPLE_FMT_S16;
avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
return 0; return 0;
} }
......
...@@ -559,6 +559,7 @@ static av_cold int decode_end(AVCodecContext *avctx) ...@@ -559,6 +559,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
static av_cold int smka_decode_init(AVCodecContext *avctx) static av_cold int smka_decode_init(AVCodecContext *avctx)
{ {
avctx->sample_fmt = SAMPLE_FMT_S16; avctx->sample_fmt = SAMPLE_FMT_S16;
avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
return 0; return 0;
} }
......
...@@ -361,6 +361,7 @@ static av_cold int wavpack_decode_init(AVCodecContext *avctx) ...@@ -361,6 +361,7 @@ static av_cold int wavpack_decode_init(AVCodecContext *avctx)
s->avctx = avctx; s->avctx = avctx;
s->stereo = (avctx->channels == 2); s->stereo = (avctx->channels == 2);
avctx->sample_fmt = SAMPLE_FMT_S16; avctx->sample_fmt = SAMPLE_FMT_S16;
avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment