diff options
author | Max Kellermann <max@duempel.org> | 2012-10-02 19:47:31 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-10-02 19:47:31 +0200 |
commit | c9e700f07928b4a7dd34b8fdd2a00c226fd9b0b4 (patch) | |
tree | 1efc17fc0611d4cf132831b9c2215631aebf3d40 /src/decoder/FLACDecoderPlugin.cxx | |
parent | 3c2d73d161814a1cac543f2623671feb0b7c8fe9 (diff) | |
download | mpd-c9e700f07928b4a7dd34b8fdd2a00c226fd9b0b4.tar.gz mpd-c9e700f07928b4a7dd34b8fdd2a00c226fd9b0b4.tar.xz mpd-c9e700f07928b4a7dd34b8fdd2a00c226fd9b0b4.zip |
decoder/flac: add ctor/dtor to struct flac_data
Diffstat (limited to 'src/decoder/FLACDecoderPlugin.cxx')
-rw-r--r-- | src/decoder/FLACDecoderPlugin.cxx | 7 |
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); } |