diff options
author | Max Kellermann <max@duempel.org> | 2008-10-11 12:52:51 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-11 12:52:51 +0200 |
commit | 42409a35e2468f13a03d23417f73730f1f8e41d5 (patch) | |
tree | 50e4ac1cd81ad5b76f64a60996f748b19e8e74cb | |
parent | dd7711d86c502c8d302b791d19a836360e758e12 (diff) | |
download | mpd-42409a35e2468f13a03d23417f73730f1f8e41d5.tar.gz mpd-42409a35e2468f13a03d23417f73730f1f8e41d5.tar.xz mpd-42409a35e2468f13a03d23417f73730f1f8e41d5.zip |
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.
-rw-r--r-- | src/player_control.c | 1 | ||||
-rw-r--r-- | src/player_control.h | 1 | ||||
-rw-r--r-- | src/player_thread.c | 3 |
3 files changed, 2 insertions, 3 deletions
diff --git a/src/player_control.c b/src/player_control.c index bab119684..0c4063693 100644 --- a/src/player_control.c +++ b/src/player_control.c @@ -50,7 +50,6 @@ set_current_song(struct song *song) assert(song != NULL); assert(song->url != NULL); - pc.fileTime = song->tag ? song->tag->time : 0; pc.next_song = song; } diff --git a/src/player_control.h b/src/player_control.h index 5b3c4a5d2..179a9c2ab 100644 --- a/src/player_control.h +++ b/src/player_control.h @@ -90,7 +90,6 @@ struct player_control { struct audio_format audio_format; volatile float totalTime; volatile float elapsedTime; - volatile float fileTime; struct song *volatile next_song; struct song *errored_song; volatile enum player_queue_state queueState; diff --git a/src/player_thread.c b/src/player_thread.c index b82005aec..61ef68389 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -60,7 +60,8 @@ static int waitOnDecode(int *decodeWaitedOn) return -1; } - pc.totalTime = pc.fileTime; + pc.totalTime = pc.next_song->tag != NULL + ? pc.next_song->tag->time : 0; pc.bitRate = 0; audio_format_clear(&pc.audio_format); *decodeWaitedOn = 1; |