From 1a6ed811935916b8cc27d9eeb7f3be3413e643f7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 21 Oct 2009 08:07:07 +0200 Subject: output_thread: check again if output is open on PAUSE Basically the same as the 0.15.5 patch "check again if output is open on CANCEL". Same race condition, same fix. --- src/output_thread.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/output_thread.c b/src/output_thread.c index 9ca844623..770b377e8 100644 --- a/src/output_thread.c +++ b/src/output_thread.c @@ -248,6 +248,15 @@ static gpointer audio_output_task(gpointer arg) break; case AO_COMMAND_PAUSE: + if (!ao->open) { + /* the output has failed after + audio_output_all_pause() has + submitted the PAUSE command; bail + out */ + ao_command_finished(ao); + break; + } + ao_pause(ao); /* don't "break" here: this might cause ao_play() to be called when command==CLOSE -- cgit v1.2.3 From d083032236dc05f00a9bfab201537083f7bb10b4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 27 Oct 2009 22:06:28 +0100 Subject: update: delete ignored symlinks from database When you disable the "follow_outside_symlinks" or the "follow_inside_symlinks" setting, the next update should remove the now-ignored files from the database. --- src/update.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/update.c b/src/update.c index 24960b449..d5c9779c8 100644 --- a/src/update.c +++ b/src/update.c @@ -672,7 +672,11 @@ updateDirectory(struct directory *directory, const struct stat *st) continue; utf8 = fs_charset_to_utf8(ent->d_name); - if (utf8 == NULL || skip_symlink(directory, utf8)) { + if (utf8 == NULL) + continue; + + if (skip_symlink(directory, utf8)) { + delete_name_in(directory, utf8); g_free(utf8); continue; } -- cgit v1.2.3 From 04816a6369b3a5277dfcb4cc7dbbe66881a2a7e9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 28 Oct 2009 22:12:22 +0100 Subject: decoder/ffmpeg: convert metadata Convert the metadata with the libavformat function av_metadata_conv(). This ensures that canonical tag names are provided by libavformat, and we can remove the "artist" vs "author" workaround. --- src/decoder/ffmpeg_plugin.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c index 27b0c2507..2f7ed6d1f 100644 --- a/src/decoder/ffmpeg_plugin.c +++ b/src/decoder/ffmpeg_plugin.c @@ -352,17 +352,17 @@ ffmpeg_copy_metadata(struct tag *tag, AVMetadata *m, static bool ffmpeg_tag_internal(struct ffmpeg_context *ctx) { struct tag *tag = (struct tag *) ctx->tag; - const AVFormatContext *f = ctx->format_context; + AVFormatContext *f = ctx->format_context; tag->time = 0; if (f->duration != (int64_t)AV_NOPTS_VALUE) tag->time = f->duration / AV_TIME_BASE; #if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(31<<8)+0) + av_metadata_conv(f, NULL, f->iformat->metadata_conv); + ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_TITLE, "title"); - if (!ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_ARTIST, "author")) - ffmpeg_copy_metadata(tag, f->metadata, - TAG_ITEM_ARTIST, "artist"); + ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_ARTIST, "author"); ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_ALBUM, "album"); ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_COMMENT, "comment"); ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_GENRE, "genre"); -- cgit v1.2.3 From 3de912e2b956821782bd77acc6e12f66086c1926 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 31 Oct 2009 18:03:50 +0100 Subject: decoder_control: removed unused DECODE_TYPE macros --- src/decoder_control.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src') diff --git a/src/decoder_control.h b/src/decoder_control.h index 703ea256c..6a04a1617 100644 --- a/src/decoder_control.h +++ b/src/decoder_control.h @@ -26,9 +26,6 @@ #include -#define DECODE_TYPE_FILE 0 -#define DECODE_TYPE_URL 1 - enum decoder_state { DECODE_STATE_STOP = 0, DECODE_STATE_START, -- cgit v1.2.3