Mercurial > audlegacy-plugins
diff src/flacng/plugin.c @ 2266:5395c85a8724
Make flacng plugin to clean up after itself (Bugzilla #19)
author | Jussi Judin <jjudin+audacious@iki.fi> |
---|---|
date | Tue, 25 Dec 2007 02:15:14 -0600 |
parents | 43da009d6e76 |
children | ead24454f4b7 |
line wrap: on
line diff
--- a/src/flacng/plugin.c Tue Dec 25 02:14:39 2007 -0600 +++ b/src/flacng/plugin.c Tue Dec 25 02:15:14 2007 -0600 @@ -32,6 +32,7 @@ InputPlugin flac_ip = { .description = "FLACng Audio Plugin", .init = flac_init, + .cleanup = flac_cleanup, .about = flac_aboutbox, .is_our_file = flac_is_our_file, .play_file = flac_play_file, @@ -152,6 +153,23 @@ /* --- */ +void flac_cleanup(void) +{ + _ENTER; + + FLAC__stream_decoder_delete(main_decoder); + clean_callback_info(main_info); + + FLAC__stream_decoder_delete(test_decoder); + clean_callback_info(test_info); + + plugin_initialized = FALSE; + + _LEAVE; +} + +/* --- */ + gboolean flac_is_our_fd(gchar* filename, VFSFile* fd) { _ENTER;