aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/FLACDecoderPlugin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/decoder/FLACDecoderPlugin.cxx')
-rw-r--r--src/decoder/FLACDecoderPlugin.cxx7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/decoder/FLACDecoderPlugin.cxx b/src/decoder/FLACDecoderPlugin.cxx
index 6bcc26c17..3795f515b 100644
--- a/src/decoder/FLACDecoderPlugin.cxx
+++ b/src/decoder/FLACDecoderPlugin.cxx
@@ -317,26 +317,23 @@ flac_decode_internal(struct decoder * decoder,
bool is_ogg)
{
FLAC__StreamDecoder *flac_dec;
- struct flac_data data;
flac_dec = flac_decoder_new();
if (flac_dec == nullptr)
return;
- flac_data_init(&data, decoder, input_stream);
+ struct flac_data data(decoder, input_stream);
data.tag = tag_new();
FLAC__StreamDecoderInitStatus status =
stream_init(flac_dec, &data, is_ogg);
if (status != FLAC__STREAM_DECODER_INIT_STATUS_OK) {
- flac_data_deinit(&data);
FLAC__stream_decoder_delete(flac_dec);
g_warning("%s", FLAC__StreamDecoderInitStatusString[status]);
return;
}
if (!flac_decoder_initialize(&data, flac_dec, 0)) {
- flac_data_deinit(&data);
FLAC__stream_decoder_finish(flac_dec);
FLAC__stream_decoder_delete(flac_dec);
return;
@@ -344,8 +341,6 @@ flac_decode_internal(struct decoder * decoder,
flac_decoder_loop(&data, flac_dec, 0, 0);
- flac_data_deinit(&data);
-
FLAC__stream_decoder_finish(flac_dec);
FLAC__stream_decoder_delete(flac_dec);
}