mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avcodec/nellymoserdec: Make decoder init-threadsafe
Easy now that initializing the ff_sine_* tables is thread-safe. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
285db1d53b
commit
35f61eb350
@ -128,13 +128,12 @@ static av_cold int decode_init(AVCodecContext * avctx) {
|
||||
s->scale_bias = 1.0/(32768*8);
|
||||
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
|
||||
|
||||
/* Generate overlap window */
|
||||
if (!ff_sine_128[127])
|
||||
ff_init_ff_sine_windows(7);
|
||||
|
||||
avctx->channels = 1;
|
||||
avctx->channel_layout = AV_CH_LAYOUT_MONO;
|
||||
|
||||
/* Generate overlap window */
|
||||
ff_init_ff_sine_windows(7);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -198,4 +197,5 @@ AVCodec ff_nellymoser_decoder = {
|
||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_PARAM_CHANGE,
|
||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT,
|
||||
AV_SAMPLE_FMT_NONE },
|
||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user