Browse Source

libspeexdec: set channel_layout

tags/n1.1
Justin Ruggles 12 years ago
parent
commit
27c3f9c03e
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      libavcodec/libspeexdec.c

+ 5
- 1
libavcodec/libspeexdec.c View File

@@ -22,8 +22,10 @@
#include <speex/speex_header.h>
#include <speex/speex_stereo.h>
#include <speex/speex_callbacks.h>
#include "avcodec.h"

#include "libavutil/audioconvert.h"
#include "libavutil/common.h"
#include "avcodec.h"

typedef struct {
AVFrame frame;
@@ -76,6 +78,8 @@ static av_cold int libspeex_decode_init(AVCodecContext *avctx)
"Decoding as stereo.\n", avctx->channels);
avctx->channels = 2;
}
avctx->channel_layout = avctx->channels == 2 ? AV_CH_LAYOUT_STEREO :
AV_CH_LAYOUT_MONO;

speex_bits_init(&s->bits);
s->dec_state = speex_decoder_init(mode);


Loading…
Cancel
Save