Unified · Split
| @@ -156,7 +156,8 @@ static av_cold int libgsm_decode_init(AVCodecContext *avctx) { · 155 unmodified lines | |||
| 156 | 156 | ||
| 157 | avctx->channels = 1; | 157 | avctx->channels = 1; |
| 158 | avctx->channel_layout = AV_CH_LAYOUT_MONO; | 158 | avctx->channel_layout = AV_CH_LAYOUT_MONO; |
| 159 | avctx->sample_rate = 8000; | 159 | if (!avctx->sample_rate) |
| 160 | avctx->sample_rate = 8000; | ||
| 160 | avctx->sample_fmt = AV_SAMPLE_FMT_S16; | 161 | avctx->sample_fmt = AV_SAMPLE_FMT_S16; |
| 161 | 162 | ||
| 162 | s->state = gsm_create(); | 163 | s->state = gsm_create(); |