diff options
-rw-r--r-- | libavcodec/cook.c | 1 | ||||
-rw-r--r-- | libavcodec/imc.c | 1 | ||||
-rw-r--r-- | libavcodec/nellymoserdec.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/cook.c b/libavcodec/cook.c index ba9f30facd..1affe03e7c 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -1177,6 +1177,7 @@ static int cook_decode_init(AVCodecContext *avctx) } avctx->sample_fmt = SAMPLE_FMT_S16; + avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO; #ifdef COOKDEBUG dump_cook_context(q); diff --git a/libavcodec/imc.c b/libavcodec/imc.c index 436a5c9552..e896eed1b9 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -155,6 +155,7 @@ static av_cold int imc_decode_init(AVCodecContext * avctx) ff_fft_init(&q->fft, 7, 1); dsputil_init(&q->dsp, avctx); avctx->sample_fmt = SAMPLE_FMT_S16; + avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO; return 0; } diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c index f2a413e49a..dfbb41caf4 100644 --- a/libavcodec/nellymoserdec.c +++ b/libavcodec/nellymoserdec.c @@ -148,6 +148,7 @@ static av_cold int decode_init(AVCodecContext * avctx) { ff_sine_window_init(sine_window, 128); avctx->sample_fmt = SAMPLE_FMT_S16; + avctx->channel_layout = CH_LAYOUT_MONO; return 0; } |