From 97fc001180e13fb6eea678d6e2c3926418a1b6bb Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 17 Dec 2013 08:58:00 +0100 Subject: input/cdio: fix typo in #include path Broken by commit 3b0fea5f --- src/input/CdioParanoiaInputPlugin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/input/CdioParanoiaInputPlugin.cxx b/src/input/CdioParanoiaInputPlugin.cxx index 3978ab9c5..b3ac57413 100644 --- a/src/input/CdioParanoiaInputPlugin.cxx +++ b/src/input/CdioParanoiaInputPlugin.cxx @@ -42,7 +42,7 @@ #include #ifdef HAVE_CDIO_PARANOIA_PARANOIA_H -#include +#include #else #include #endif -- cgit v1.2.3 From e4d69f38b028ab6665a3c14ab27df188e6e39022 Mon Sep 17 00:00:00 2001 From: Michal Smucr Date: Thu, 19 Dec 2013 09:32:01 +0100 Subject: riff: recognize upper-case "ID3" chunk name Some tagging libraries (eg. TagLib) produce that variant. --- src/tag/Riff.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/tag/Riff.cxx b/src/tag/Riff.cxx index ad64afc39..ac162bc24 100644 --- a/src/tag/Riff.cxx +++ b/src/tag/Riff.cxx @@ -87,7 +87,8 @@ riff_seek_id3(FILE *file) /* pad byte */ ++size; - if (memcmp(chunk.id, "id3 ", 4) == 0) + if (memcmp(chunk.id, "id3 ", 4) == 0 || + memcmp(chunk.id, "ID3 ", 4) == 0) /* found it! */ return size; -- cgit v1.2.3 From a191db84f2acfc2d6e40fb00dff15888e507faa6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 19 Dec 2013 10:58:20 +0100 Subject: util/Error: add missing include For std::move(). --- src/util/Error.hxx | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/util/Error.hxx b/src/util/Error.hxx index facb461dc..ec8867c6c 100644 --- a/src/util/Error.hxx +++ b/src/util/Error.hxx @@ -24,6 +24,7 @@ #include "Compiler.h" #include +#include #include -- cgit v1.2.3 From 6b3b8c6f2e436c110d9cf895130c9bce54aa307c Mon Sep 17 00:00:00 2001 From: Steven O'Brien Date: Fri, 20 Dec 2013 20:45:07 +0000 Subject: fix FfmpegDecoderPlugin to use relative timestamps --- src/decoder/FfmpegDecoderPlugin.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/decoder/FfmpegDecoderPlugin.cxx b/src/decoder/FfmpegDecoderPlugin.cxx index 6add90045..47e1a3384 100644 --- a/src/decoder/FfmpegDecoderPlugin.cxx +++ b/src/decoder/FfmpegDecoderPlugin.cxx @@ -251,13 +251,14 @@ static DecoderCommand ffmpeg_send_packet(Decoder &decoder, InputStream &is, const AVPacket *packet, AVCodecContext *codec_context, - const AVRational *time_base, + const AVStream *stream, AVFrame *frame, uint8_t **buffer, int *buffer_size) { if (packet->pts >= 0 && packet->pts != (int64_t)AV_NOPTS_VALUE) decoder_timestamp(decoder, - time_from_ffmpeg(packet->pts, *time_base)); + time_from_ffmpeg(packet->pts - stream->start_time, + stream->time_base)); AVPacket packet2 = *packet; @@ -470,7 +471,7 @@ ffmpeg_decode(Decoder &decoder, InputStream &input) if (packet.stream_index == audio_stream) cmd = ffmpeg_send_packet(decoder, input, &packet, codec_context, - &av_stream->time_base, + av_stream, frame, &interleaved_buffer, &interleaved_buffer_size); else @@ -481,7 +482,8 @@ ffmpeg_decode(Decoder &decoder, InputStream &input) if (cmd == DecoderCommand::SEEK) { int64_t where = time_to_ffmpeg(decoder_seek_where(decoder), - av_stream->time_base); + av_stream->time_base) + + av_stream->start_time; if (av_seek_frame(format_context, audio_stream, where, AV_TIME_BASE) < 0) -- cgit v1.2.3 From c05691b546544e22b5e39847cf8618c9496d3cc1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 24 Dec 2013 11:51:37 +0100 Subject: OutputControl: update both ReplayGainFilters The "mode" of the second ReplayGainFilter was never set, and thus replay gain was never applied to the new song during cross-fade. --- src/OutputControl.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/OutputControl.cxx b/src/OutputControl.cxx index 553507a2a..27f280231 100644 --- a/src/OutputControl.cxx +++ b/src/OutputControl.cxx @@ -101,6 +101,8 @@ audio_output_set_replay_gain_mode(struct audio_output *ao, { if (ao->replay_gain_filter != nullptr) replay_gain_filter_set_mode(ao->replay_gain_filter, mode); + if (ao->other_replay_gain_filter != nullptr) + replay_gain_filter_set_mode(ao->other_replay_gain_filter, mode); } void -- cgit v1.2.3 From 91fed47648fbc7ee478a940ebcecf462b5541131 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 24 Dec 2013 11:58:10 +0100 Subject: PlayerThread: log the last song that was played --- src/PlayerThread.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/PlayerThread.cxx b/src/PlayerThread.cxx index 6fb41bf35..356559e37 100644 --- a/src/PlayerThread.cxx +++ b/src/PlayerThread.cxx @@ -1081,8 +1081,11 @@ Player::Run() delete cross_fade_tag; - if (song != nullptr) + if (song != nullptr) { + const auto uri = song->GetURI(); + FormatDefault(player_domain, "played \"%s\"", uri.c_str()); song->Free(); + } pc.Lock(); -- cgit v1.2.3