You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
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>
This commit is contained in:
@@ -212,9 +212,12 @@ static int libgsm_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
|
|
||||||
static void libgsm_flush(AVCodecContext *avctx) {
|
static void libgsm_flush(AVCodecContext *avctx) {
|
||||||
LibGSMDecodeContext *s = avctx->priv_data;
|
LibGSMDecodeContext *s = avctx->priv_data;
|
||||||
|
int one = 1;
|
||||||
|
|
||||||
gsm_destroy(s->state);
|
gsm_destroy(s->state);
|
||||||
s->state = gsm_create();
|
s->state = gsm_create();
|
||||||
|
if (avctx->codec_id == CODEC_ID_GSM_MS)
|
||||||
|
gsm_option(s->state, GSM_OPT_WAV49, &one);
|
||||||
}
|
}
|
||||||
|
|
||||||
AVCodec ff_libgsm_decoder = {
|
AVCodec ff_libgsm_decoder = {
|
||||||
|
Reference in New Issue
Block a user