summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-05-30 20:25:35 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2024-05-31 23:02:28 -0400
commitd1aeb7db9dbc3cdd0db25ab709b9e2d2322ef8d2 (patch)
treea4206b281d04a43d3843335aaa631138ffe82cd0 /apps/playback.c
parenteaeaac598d5c06a138a5e8ea012f7a959461e473 (diff)
downloadrockbox-d1aeb7db9dbc3cdd0db25ab709b9e2d2322ef8d2.tar.gz
rockbox-d1aeb7db9dbc3cdd0db25ab709b9e2d2322ef8d2.zip
[Coverity] playback.c audio_auto_change_frequency check for valid id3
Change-Id: Ia213134c690f4c1de16afba38eea740825558280
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 7ea44a047f..18f62fb69b 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -4054,6 +4054,8 @@ static unsigned long audio_guess_frequency(struct mp3entry *id3)
4054 4054
4055static bool audio_auto_change_frequency(struct mp3entry *id3, bool play) 4055static bool audio_auto_change_frequency(struct mp3entry *id3, bool play)
4056{ 4056{
4057 if (!valid_mp3entry(id3))
4058 return false;
4057 unsigned long guessed_frequency = global_settings.play_frequency == 0 ? audio_guess_frequency(id3) : 0; 4059 unsigned long guessed_frequency = global_settings.play_frequency == 0 ? audio_guess_frequency(id3) : 0;
4058 if (guessed_frequency && mixer_get_frequency() != guessed_frequency) 4060 if (guessed_frequency && mixer_get_frequency() != guessed_frequency)
4059 { 4061 {