mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
avcodec/wavpack: Move initializing DSD data to a better place
Namely to code that is only executed if we are indeed initializing a DSD context. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
2aac42605c
commit
8dd0bd4f9b
@ -1011,6 +1011,8 @@ static int wv_dsd_reset(WavpackContext *s, int channels)
|
||||
for (i = 0; i < channels; i++)
|
||||
memset(s->dsdctx[i].buf, 0x69, sizeof(s->dsdctx[i].buf));
|
||||
|
||||
ff_init_dsd_data();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1533,7 +1535,6 @@ static int wavpack_decode_block(AVCodecContext *avctx, AVFrame *frame, int block
|
||||
av_log(avctx, AV_LOG_ERROR, "Error reinitializing the DSD context\n");
|
||||
return ret;
|
||||
}
|
||||
ff_init_dsd_data();
|
||||
}
|
||||
av_channel_layout_copy(&avctx->ch_layout, &new_ch_layout);
|
||||
avctx->sample_rate = new_samplerate;
|
||||
|
Loading…
Reference in New Issue
Block a user