diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-05-16 12:24:07 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-05-16 12:24:07 +0200 |
commit | 3a0a13456fb328e4cc80198186a4efb7fff17ba6 (patch) | |
tree | 63d1a288fa3d68eeacd0e57d49a06018e9785fed | |
parent | 919e8f9e45c77217d1893281ca8606b21c1389f5 (diff) |
wavpack error handling patch
-rw-r--r-- | plugins/wavpack/wavpack.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/wavpack/wavpack.c b/plugins/wavpack/wavpack.c index 9e3abd68..e2f9e43b 100644 --- a/plugins/wavpack/wavpack.c +++ b/plugins/wavpack/wavpack.c @@ -105,8 +105,10 @@ wv_init (DB_fileinfo_t *_info, DB_playItem_t *it) { if (!info->file) { return -1; } - info->ctx = WavpackOpenFileInputEx (&wsr, info->file, NULL, NULL, OPEN_2CH_MAX/*|OPEN_WVC*/, 0); + char error[80]; + info->ctx = WavpackOpenFileInputEx (&wsr, info->file, NULL, error, OPEN_2CH_MAX/*|OPEN_WVC*/, 0); if (!info->ctx) { + fprintf (stderr, "wavpack error: %s\n", error); return -1; } _info->plugin = &plugin; @@ -226,9 +228,10 @@ wv_insert (DB_playItem_t *after, const char *fname) { if (!fp) { return NULL; } - WavpackContext *ctx = WavpackOpenFileInputEx (&wsr, fp, NULL, NULL, 0, 0); + char error[80]; + WavpackContext *ctx = WavpackOpenFileInputEx (&wsr, fp, NULL, error, 0, 0); if (!ctx) { - trace ("WavpackOpenFileInput failed"); + fprintf (stderr, "wavpack error: %s\n", error); deadbeef->fclose (fp); return NULL; } |