summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-31 23:41:17 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-04-04 23:58:57 +0200
commite81fa9f482122311186840798d50c566674da93f (patch)
treecaae1371676d10e51178bcab5674e46755ed3987
parent1c2860e8152e7c23e1a1f8985b71c24e673b87e8 (diff)
avcodec/wavpack: Only initialize DSD data when encountering DSD
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/wavpack.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 36bd4662e8..c96c8e0583 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -1049,8 +1049,6 @@ static av_cold int wavpack_decode_init(AVCodecContext *avctx)
if (!s->curr_frame.f || !s->prev_frame.f)
return AVERROR(ENOMEM);
- ff_init_dsd_data();
-
return 0;
}
@@ -1529,6 +1527,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
return ret;
}
ff_thread_release_ext_buffer(&wc->curr_frame);
+ ff_init_dsd_data();
}
av_channel_layout_copy(&avctx->ch_layout, &new_ch_layout);
avctx->sample_rate = new_samplerate;