decoder/Thread: don't scan for replay gain tags in PCM streams

This disables a long delay for playing songs from the cdio_paranoia
input plugin if ReplayGain is enabled.
This commit is contained in:
Max Kellermann 2022-07-08 16:18:31 +02:00
parent c0d5bd2048
commit 6857286b42
2 changed files with 9 additions and 0 deletions

1
NEWS
View File

@ -4,6 +4,7 @@ ver 0.23.8 (not yet released)
* input
- cdio_paranoia: fix crash if no drive was found
- cdio_paranoia: faster cancellation
- cdio_paranoia: don't scan for replay gain tags
* output
- pipewire: fix crash with PipeWire 0.3.53
* mixer

View File

@ -36,6 +36,7 @@
#include "util/RuntimeError.hxx"
#include "util/Domain.hxx"
#include "util/ScopeExit.hxx"
#include "util/StringCompare.hxx"
#include "thread/Name.hxx"
#include "tag/ApeReplayGain.hxx"
#include "Log.hxx"
@ -265,6 +266,13 @@ MaybeLoadReplayGain(DecoderBridge &bridge, InputStream &is)
/* ReplayGain is disabled */
return;
if (is.HasMimeType() &&
StringStartsWith(is.GetMimeType(), "audio/x-mpd-"))
/* skip for (virtual) files (e.g. from the
cdio_paranoia input plugin) which cannot possibly
contain tags */
return;
LoadReplayGain(bridge, is);
}