return bytes_read;
}
-#if HAVE_THREADS
-static int init_thread_copy(AVCodecContext *avctx)
-{
- FLACContext *s = avctx->priv_data;
- s->decoded_buffer = NULL;
- s->decoded_buffer_size = 0;
- s->avctx = avctx;
- if (s->flac_stream_info.max_blocksize)
- return allocate_buffers(s);
- return 0;
-}
-#endif
-
static av_cold int flac_decode_close(AVCodecContext *avctx)
{
FLACContext *s = avctx->priv_data;
.init = flac_decode_init,
.close = flac_decode_close,
.decode = flac_decode_frame,
- .init_thread_copy = ONLY_IF_THREADS_ENABLED(init_thread_copy),
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_S16P,