comparison src/audacious/input.c @ 4028:bb709f82068b

- Close dup()-ed file if ID3 file handling fails
author Ralf Ertzinger <ralf@skytale.net>
date Wed, 28 Nov 2007 16:49:24 +0100
parents b747ad540903
children 76da6fe8cb39
comparison
equal deleted inserted replaced
3897:7d5c7b49aa03 4028:bb709f82068b
367 367
368 /* Check for plugins with custom URI:// strings */ 368 /* Check for plugins with custom URI:// strings */
369 /* cue:// cdda:// tone:// tact:// */ 369 /* cue:// cdda:// tone:// tact:// */
370 if ((ip = uri_get_plugin(filename)) != NULL && ip->enabled) 370 if ((ip = uri_get_plugin(filename)) != NULL && ip->enabled)
371 { 371 {
372 printf("Offering '%s' to %s, based on special URL scheme\n", filename, ip->description);
372 if (ip->is_our_file != NULL) 373 if (ip->is_our_file != NULL)
373 ret = ip->is_our_file(filename_proxy); 374 ret = ip->is_our_file(filename_proxy);
374 else 375 else
375 ret = 0; 376 ret = 0;
376 if (ret > 0) 377 if (ret > 0)
400 !g_strncasecmp(filename, "file://", 7))) ? TRUE : FALSE; 401 !g_strncasecmp(filename, "file://", 7))) ? TRUE : FALSE;
401 402
402 mimetype = vfs_get_metadata(fd, "content-type"); 403 mimetype = vfs_get_metadata(fd, "content-type");
403 if ((ip = mime_get_plugin(mimetype)) != NULL && ip->enabled) 404 if ((ip = mime_get_plugin(mimetype)) != NULL && ip->enabled)
404 { 405 {
406 printf("Offering '%s' to %s, based on mime-type\n", filename, ip->description);
405 if (ip->probe_for_tuple != NULL) 407 if (ip->probe_for_tuple != NULL)
406 { 408 {
407 Tuple *tuple = ip->probe_for_tuple(filename_proxy, fd); 409 Tuple *tuple = ip->probe_for_tuple(filename_proxy, fd);
408 410
409 if (tuple != NULL) 411 if (tuple != NULL)
455 { 457 {
456 ip = INPUT_PLUGIN(node->data); 458 ip = INPUT_PLUGIN(node->data);
457 459
458 if (!ip || !ip->enabled) 460 if (!ip || !ip->enabled)
459 continue; 461 continue;
462
463 printf("Offering '%s' to %s\n", filename, ip->description);
460 464
461 vfs_rewind(fd); 465 vfs_rewind(fd);
462 466
463 if (cfg.use_extension_probing == TRUE && ip->vfs_extensions != NULL && 467 if (cfg.use_extension_probing == TRUE && ip->vfs_extensions != NULL &&
464 ext != NULL && ext != (gpointer) 0x1 && use_ext_filter == TRUE) 468 ext != NULL && ext != (gpointer) 0x1 && use_ext_filter == TRUE)