Mercurial > audlegacy-plugins
changeset 1520:2ed7413c199a
wavpack fixes
author | William Pitcock <nenolod@atheme-project.org> |
---|---|
date | Thu, 23 Aug 2007 20:32:41 -0500 |
parents | d603becf76e0 |
children | fc246407b2ad |
files | src/wavpack/libwavpack.cxx |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/wavpack/libwavpack.cxx Sat Aug 18 14:18:34 2007 -0500 +++ b/src/wavpack/libwavpack.cxx Thu Aug 23 20:32:41 2007 -0500 @@ -165,6 +165,8 @@ ctx = NULL; input = NULL; output = NULL; + wv_Input = NULL; + wvc_Input = NULL; } ~WavpackDecoder() @@ -178,8 +180,11 @@ output = NULL; } if (ctx != NULL) { - vfs_fclose(wv_Input); - vfs_fclose(wvc_Input); + if (wv_Input) + vfs_fclose(wv_Input); + + if (wvc_Input) + vfs_fclose(wvc_Input); g_free(ctx); ctx = NULL; } @@ -204,11 +209,9 @@ return true; } - bool attach(gchar *filename, VFSFile *wv_Input) + bool attach(gchar *filename, VFSFile *wvi) { - vfs_dup(wv_Input); - - ctx = WavpackOpenFileInputEx(&reader, wv_Input, NULL, error_buff, OPEN_TAGS, 0); + ctx = WavpackOpenFileInputEx(&reader, wvi, NULL, error_buff, OPEN_TAGS, 0); if (ctx == NULL) return false;