Commit 42409a35 authored by Max Kellermann's avatar Max Kellermann

player: removed player_control.fileTime

This variable is superfluous, it is only used to copy its value to player_control.totalTime. Since the original source of this value (song->tag->time) will still be available at this point, we can safely remove fileTime.
parent dd7711d8
...@@ -50,7 +50,6 @@ set_current_song(struct song *song) ...@@ -50,7 +50,6 @@ set_current_song(struct song *song)
assert(song != NULL); assert(song != NULL);
assert(song->url != NULL); assert(song->url != NULL);
pc.fileTime = song->tag ? song->tag->time : 0;
pc.next_song = song; pc.next_song = song;
} }
......
...@@ -90,7 +90,6 @@ struct player_control { ...@@ -90,7 +90,6 @@ struct player_control {
struct audio_format audio_format; struct audio_format audio_format;
volatile float totalTime; volatile float totalTime;
volatile float elapsedTime; volatile float elapsedTime;
volatile float fileTime;
struct song *volatile next_song; struct song *volatile next_song;
struct song *errored_song; struct song *errored_song;
volatile enum player_queue_state queueState; volatile enum player_queue_state queueState;
......
...@@ -60,7 +60,8 @@ static int waitOnDecode(int *decodeWaitedOn) ...@@ -60,7 +60,8 @@ static int waitOnDecode(int *decodeWaitedOn)
return -1; return -1;
} }
pc.totalTime = pc.fileTime; pc.totalTime = pc.next_song->tag != NULL
? pc.next_song->tag->time : 0;
pc.bitRate = 0; pc.bitRate = 0;
audio_format_clear(&pc.audio_format); audio_format_clear(&pc.audio_format);
*decodeWaitedOn = 1; *decodeWaitedOn = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment