diff options
author | Martin Storsjö <martin@martin.st> | 2011-12-14 22:32:29 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-03 18:19:22 +0100 |
commit | 1804becb30eca0e95d85925bf9aead586809dee6 (patch) | |
tree | 4614857919dc8a880629f50edf265af3ae6849db | |
parent | a11c9d77781b1bb5f94f5925de9896069d35a0cc (diff) | |
download | ffmpeg-1804becb30eca0e95d85925bf9aead586809dee6.tar.gz |
libgsm: Reset the MS mode of GSM in the flush function
The mode is set in libgsm_decode_init, but the decoder
object is simply destroyed and recreated in the flush
function - therefore the mode has to be set again.
This fixes playback using the libgsm_ms decoder in avplay.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 1b35af3225392a5328f6534c53e96a56cd5eb305)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/libgsm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c index 65b1911c79..ed4962a3b2 100644 --- a/libavcodec/libgsm.c +++ b/libavcodec/libgsm.c @@ -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 = { |