diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-10-02 22:02:45 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-10-02 22:02:45 +0200 |
commit | 1801a1e3308604e38f549d417a15fb53bcf5abeb (patch) | |
tree | f15b910404eb522ca0823cecff031ef425f7b5dd | |
parent | e6a3161feaecbd9e0ebaa7f02f8955a23f4c7f2e (diff) |
fixed memleak in flac plugin
-rw-r--r-- | plugins/flac/flac.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/plugins/flac/flac.c b/plugins/flac/flac.c index 536c8489..00cdf598 100644 --- a/plugins/flac/flac.c +++ b/plugins/flac/flac.c @@ -618,24 +618,6 @@ cflac_insert (DB_playItem_t *after, const char *fname) { goto cflac_insert_fail; } -#if 0 - FLAC__stream_decoder_set_md5_checking(decoder, 0); - // try embedded cue - FLAC__stream_decoder_set_metadata_respond_all (decoder); - status = FLAC__stream_decoder_init_stream (decoder, flac_read_cb, flac_seek_cb, flac_tell_cb, flac_lenght_cb, flac_eof_cb, cflac_init_write_callback, cflac_init_cue_metadata_callback, cflac_init_error_callback, &cb); - if (status != FLAC__STREAM_DECODER_INIT_STATUS_OK || cflac_init_stop_decoding) { - trace ("flac: FLAC__stream_decoder_init_stream failed\n"); - goto cflac_insert_fail; - } - if (!FLAC__stream_decoder_process_until_end_of_metadata (decoder) || cflac_init_stop_decoding) { - trace ("flac: FLAC__stream_decoder_process_until_end_of_metadata failed\n"); - goto cflac_insert_fail; - } - - FLAC__stream_decoder_delete(decoder); - decoder = NULL; -#endif - // read all metadata FLAC__stream_decoder_set_md5_checking(decoder, 0); FLAC__stream_decoder_set_metadata_respond_all (decoder); @@ -690,13 +672,6 @@ cflac_insert (DB_playItem_t *after, const char *fname) { trace ("flac: loaded external cuesheet\n"); return cue_after; } - decoder = FLAC__stream_decoder_new(); - if (!decoder) { - if (info.file) { - deadbeef->fclose (info.file); - } - goto cflac_insert_fail; - } after = deadbeef->pl_insert_item (after, it); deadbeef->pl_item_unref (it); if (info.file) { |