# HG changeset patch # User Ralf Ertzinger # Date 1196264964 -3600 # Node ID bb709f82068b9339e3f756441ae8500ad28eb2e8 # Parent 7d5c7b49aa03e2589cc614165ca837be40718cfb - Close dup()-ed file if ID3 file handling fails diff -r 7d5c7b49aa03 -r bb709f82068b src/audacious/input.c --- a/src/audacious/input.c Sun Nov 04 01:46:57 2007 +0200 +++ b/src/audacious/input.c Wed Nov 28 16:49:24 2007 +0100 @@ -369,6 +369,7 @@ /* cue:// cdda:// tone:// tact:// */ if ((ip = uri_get_plugin(filename)) != NULL && ip->enabled) { + printf("Offering '%s' to %s, based on special URL scheme\n", filename, ip->description); if (ip->is_our_file != NULL) ret = ip->is_our_file(filename_proxy); else @@ -402,6 +403,7 @@ mimetype = vfs_get_metadata(fd, "content-type"); if ((ip = mime_get_plugin(mimetype)) != NULL && ip->enabled) { + printf("Offering '%s' to %s, based on mime-type\n", filename, ip->description); if (ip->probe_for_tuple != NULL) { Tuple *tuple = ip->probe_for_tuple(filename_proxy, fd); @@ -458,6 +460,8 @@ if (!ip || !ip->enabled) continue; + printf("Offering '%s' to %s\n", filename, ip->description); + vfs_rewind(fd); if (cfg.use_extension_probing == TRUE && ip->vfs_extensions != NULL && diff -r 7d5c7b49aa03 -r bb709f82068b src/libid3tag/file.c --- a/src/libid3tag/file.c Sun Nov 04 01:46:57 2007 +0200 +++ b/src/libid3tag/file.c Wed Nov 28 16:49:24 2007 +0100 @@ -494,6 +494,7 @@ file = new_file(iofile, mode, path); if (file == 0){ printf("id3_file_vfsopen: file failed\n"); + aud_vfs_fclose(iofile); } aud_vfs_fseek(iofile, curpos, SEEK_SET);