History

libgsmdec: fix decoding of non 8khz gsm files

Michael Niedermayer committed 14 years ago

Commit d3dfe991 parent 6e6033b1 file · +2 −1Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/libgsm.c+2−1
@@ -156,7 +156,8 @@ static av_cold int libgsm_decode_init(AVCodecContext *avctx) { · 155 unmodified lines
156156
157157 avctx->channels = 1;
158158 avctx->channel_layout = AV_CH_LAYOUT_MONO;
159− avctx->sample_rate = 8000;
159+ if (!avctx->sample_rate)
160+ avctx->sample_rate = 8000;
160161 avctx->sample_fmt = AV_SAMPLE_FMT_S16;
161162
162163 s->state = gsm_create();

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t