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.
This commit is contained in:
Max Kellermann 2008-10-11 12:52:51 +02:00
parent dd7711d86c
commit 42409a35e2
3 changed files with 2 additions and 3 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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;