aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/output_all.c5
-rw-r--r--src/player_thread.c1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/output_all.c b/src/output_all.c
index 415221aa4..194a65924 100644
--- a/src/output_all.c
+++ b/src/output_all.c
@@ -441,7 +441,10 @@ audio_output_all_check(void)
this chunk */
return music_pipe_size(g_mp);
- audio_output_all_elapsed_time = chunk->times;
+ if (chunk->length > 0 && chunk->times >= 0.0)
+ /* only update elapsed_time if the chunk
+ provides a defined value */
+ audio_output_all_elapsed_time = chunk->times;
is_tail = chunk->next == NULL;
if (is_tail)
diff --git a/src/player_thread.c b/src/player_thread.c
index 0581b111a..4f754241b 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -333,6 +333,7 @@ player_send_silence(struct player *player)
chunk->audio_format = player->play_audio_format;
#endif
+ chunk->times = -1.0; /* undefined time stamp */
chunk->length = num_frames * frame_size;
memset(chunk->data, 0, chunk->length);