Browse Source

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>
tags/n4.4
Andreas Rheinhardt 5 years ago
parent
commit
35f61eb350
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      libavcodec/nellymoserdec.c

+ 4
- 4
libavcodec/nellymoserdec.c View File

@@ -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…
Cancel
Save