aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/decoder/flac_plugin.c5
-rw-r--r--src/output_thread.c3
-rw-r--r--src/update_walk.c12
3 files changed, 11 insertions, 9 deletions
diff --git a/src/decoder/flac_plugin.c b/src/decoder/flac_plugin.c
index bf0c76633..9692ba49f 100644
--- a/src/decoder/flac_plugin.c
+++ b/src/decoder/flac_plugin.c
@@ -299,12 +299,12 @@ flac_cue_tag_load(const char *file)
unsigned int sample_rate = 0;
FLAC__uint64 track_time = 0;
#ifdef HAVE_CUE /* libcue */
- FLAC__StreamMetadata* vc = FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT);
+ FLAC__StreamMetadata* vc;
char* cs_filename;
FILE* cs_file;
#endif /* libcue */
FLAC__StreamMetadata* si = FLAC__metadata_object_new(FLAC__METADATA_TYPE_STREAMINFO);
- FLAC__StreamMetadata* cs = FLAC__metadata_object_new(FLAC__METADATA_TYPE_CUESHEET);
+ FLAC__StreamMetadata* cs;
tnum = flac_vtrack_tnum(file);
char_tnum = g_strdup_printf("%u", tnum);
@@ -328,6 +328,7 @@ flac_cue_tag_load(const char *file)
}
}
}
+
FLAC__metadata_object_delete(vc);
}
diff --git a/src/output_thread.c b/src/output_thread.c
index e1f20e580..11dea0845 100644
--- a/src/output_thread.c
+++ b/src/output_thread.c
@@ -351,7 +351,8 @@ static gpointer audio_output_task(gpointer arg)
case AO_COMMAND_CANCEL:
ao->chunk = NULL;
- ao_plugin_cancel(ao->plugin, ao->data);
+ if (ao->open)
+ ao_plugin_cancel(ao->plugin, ao->data);
ao_command_finished(ao);
/* the player thread will now clear our music
diff --git a/src/update_walk.c b/src/update_walk.c
index 660640a67..bf6b0ef15 100644
--- a/src/update_walk.c
+++ b/src/update_walk.c
@@ -472,20 +472,20 @@ update_container_file( struct directory* directory,
while ((vtrack = plugin->container_scan(pathname, ++tnum)) != NULL)
{
struct song* song = song_file_new(vtrack, contdir);
- if (song == NULL)
- return true;
+ char *child_path_fs;
// shouldn't be necessary but it's there..
song->mtime = st->st_mtime;
- song->tag = plugin->tag_dup(map_directory_child_fs(contdir, vtrack));
+ child_path_fs = map_directory_child_fs(contdir, vtrack);
+ g_free(vtrack);
+
+ song->tag = plugin->tag_dup(child_path_fs);
+ g_free(child_path_fs);
songvec_add(&contdir->songs, song);
- song = NULL;
modified = true;
-
- g_free(vtrack);
}
g_free(pathname);