summaryrefslogtreecommitdiff
path: root/libavcodec/libgsm.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-16 01:23:15 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-16 01:23:15 +0100
commit175cc378b3bd970caf1641e5df3361d6233747e1 (patch)
treed237cb08b1b6909154a007d3c06f0dab61b9700f /libavcodec/libgsm.c
parent56669837ce18d15d757a144712a082b9cb535c94 (diff)
parentd3b8bde2f14f78109a892e57f544bf840cf6d4fc (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: movenc: Rudimentary IODs support. v410enc: fix output buffer size check v410enc: include correct headers fate: add -pix_fmt rgb48le to r210 test flvenc: Support muxing 16 kHz nellymoser configure: refactor list of programs into a variable fate: add r210 decoder test fate: split off Indeo FATE tests into their own file fate: split off ATRAC FATE tests into their own file fate: Add FATE tests for v410 encoder and decoder ARM: fix external symbol refs in rv40 asm westwood: Make sure audio header info is present when parsing audio packets libgsm: Reset the MS mode of GSM in the flush function libgsm: Set options on the right object ARM: dca: disable optimised decode_blockcodes() for old gcc Conflicts: configure libavformat/movenc.c libavformat/movenc.h tests/fate2.mak tests/ref/acodec/alac tests/ref/vsynth1/mpeg4 tests/ref/vsynth2/mpeg4 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libgsm.c')
-rw-r--r--libavcodec/libgsm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c
index 9ba9da9e3f..ed4962a3b2 100644
--- a/libavcodec/libgsm.c
+++ b/libavcodec/libgsm.c
@@ -155,7 +155,7 @@ static av_cold int libgsm_decode_init(AVCodecContext *avctx) {
break;
case CODEC_ID_GSM_MS: {
int one = 1;
- gsm_option(avctx->priv_data, GSM_OPT_WAV49, &one);
+ gsm_option(s->state, GSM_OPT_WAV49, &one);
avctx->frame_size = 2 * GSM_FRAME_SIZE;
avctx->block_align = GSM_MS_BLOCK_SIZE;
}
@@ -212,9 +212,12 @@ static int libgsm_decode_frame(AVCodecContext *avctx, void *data,
static void libgsm_flush(AVCodecContext *avctx) {
LibGSMDecodeContext *s = avctx->priv_data;
+ int one = 1;
gsm_destroy(s->state);
s->state = gsm_create();
+ if (avctx->codec_id == CODEC_ID_GSM_MS)
+ gsm_option(s->state, GSM_OPT_WAV49, &one);
}
AVCodec ff_libgsm_decoder = {