player_thread: ignore time stamp on empty chunks
If a music_chunk does not contain any PCM data, then the "times" and "bit_rate" attributes are undefined.
This commit is contained in:
parent
7ba7e67323
commit
47bbb73ee1
@ -416,9 +416,6 @@ play_chunk(struct song *song, struct music_chunk *chunk,
|
||||
|
||||
assert(music_chunk_check_format(chunk, format));
|
||||
|
||||
pc.elapsed_time = chunk->times;
|
||||
pc.bit_rate = chunk->bit_rate;
|
||||
|
||||
if (chunk->tag != NULL) {
|
||||
if (!song_is_file(song)) {
|
||||
/* always update the tag of remote streams */
|
||||
@ -439,6 +436,12 @@ play_chunk(struct song *song, struct music_chunk *chunk,
|
||||
}
|
||||
}
|
||||
|
||||
if (chunk->length == 0)
|
||||
return true;
|
||||
|
||||
pc.elapsed_time = chunk->times;
|
||||
pc.bit_rate = chunk->bit_rate;
|
||||
|
||||
/* apply software volume */
|
||||
|
||||
success = pcm_volume(chunk->data, chunk->length,
|
||||
|
Loading…
Reference in New Issue
Block a user