diff options
author | Alessio Treglia <alessio@debian.org> | 2013-02-05 08:26:55 +0000 |
---|---|---|
committer | Alessio Treglia <alessio@debian.org> | 2013-02-05 08:26:55 +0000 |
commit | 8ac48f1cdea1d7cef55e01d1a343c43bdb0ca56b (patch) | |
tree | 2bacc4a9723853a1a122b89674bf3c39ec64bd94 /src | |
parent | ff3a0f5e22802276eeff736d3bd94c666d413a84 (diff) |
Imported Upstream version 3.3.4
Diffstat (limited to 'src')
-rw-r--r-- | src/audacious/adder.c | 5 | ||||
-rw-r--r-- | src/audacious/playback.c | 19 | ||||
-rw-r--r-- | src/audacious/probe.c | 4 | ||||
-rw-r--r-- | src/libaudgui/about.c | 2 |
4 files changed, 22 insertions, 8 deletions
diff --git a/src/audacious/adder.c b/src/audacious/adder.c index 22fba2d..ea88957 100644 --- a/src/audacious/adder.c +++ b/src/audacious/adder.c @@ -503,6 +503,11 @@ void adder_cleanup (void) pthread_mutex_unlock (& mutex); pthread_join (add_thread, NULL); + g_list_free_full (add_tasks, (GDestroyNotify) add_task_free); + add_tasks = NULL; + g_list_free_full (add_results, (GDestroyNotify) add_result_free); + add_results = NULL; + if (add_source) { g_source_remove (add_source); diff --git a/src/audacious/playback.c b/src/audacious/playback.c index 69b76ab..5ef9a6c 100644 --- a/src/audacious/playback.c +++ b/src/audacious/playback.c @@ -302,10 +302,8 @@ static void * playback_thread (void * unused) if (! current_decoder) { - char * error = g_strdup_printf (_("No decoder found for %s."), - current_filename); + SPRINTF (error, _("No decoder found for %s."), current_filename); interface_show_error (error); - g_free (error); playback_error = TRUE; goto DONE; } @@ -322,7 +320,18 @@ static void * playback_thread (void * unused) bool_t seekable = (playback_entry_get_length () > 0); - VFSFile * file = vfs_fopen (current_filename, "r"); + VFSFile * file = NULL; + + if (! current_decoder->schemes || ! current_decoder->schemes[0]) + { + if (! (file = vfs_fopen (current_filename, "r"))) + { + SPRINTF (error, _("%s could not be opened."), current_filename); + interface_show_error (error); + playback_error = TRUE; + goto DONE; + } + } time_offset = seekable ? playback_entry_get_start_time () : 0; playback_error = ! current_decoder->play (& playback_api, current_filename, @@ -457,7 +466,7 @@ char * playback_get_title (void) char s[32]; - if (current_length) + if (current_length > 0) { int len = current_length / 1000; diff --git a/src/audacious/probe.c b/src/audacious/probe.c index 64a583f..7eb2c1e 100644 --- a/src/audacious/probe.c +++ b/src/audacious/probe.c @@ -34,7 +34,7 @@ typedef struct { const char * filename; VFSFile * handle; - bool_t buffered, failed; + bool_t failed; PluginHandle * plugin; } ProbeState; @@ -47,7 +47,7 @@ static bool_t check_opened (ProbeState * state) return FALSE; AUDDBG ("Opening %s.\n", state->filename); - if ((state->buffered = vfs_is_remote (state->filename))) + if (vfs_is_remote (state->filename)) state->handle = probe_buffer_new (state->filename); else state->handle = vfs_fopen (state->filename, "r"); diff --git a/src/libaudgui/about.c b/src/libaudgui/about.c index eee71ef..4906fdf 100644 --- a/src/libaudgui/about.c +++ b/src/libaudgui/about.c @@ -27,7 +27,7 @@ static const char about_text[] = "<big><b>Audacious " VERSION "</b></big>\n" - "Copyright © 2001-2012 Audacious developers and others"; + "Copyright © 2001-2013 Audacious developers and others"; static const char website[] = "http://audacious-media-player.org"; |