diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/output/raop_output_plugin.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/output/raop_output_plugin.c b/src/output/raop_output_plugin.c index 745040e0f..51d1d629b 100644 --- a/src/output/raop_output_plugin.c +++ b/src/output/raop_output_plugin.c @@ -623,8 +623,9 @@ send_audio_data(int fd, GError **error_r) get_time_for_rtp(&raop_session->play_state, &rtp_time); gettimeofday(¤t_time, NULL); - int diff = difference(¤t_time, &rtp_time); - g_usleep(-diff); + int diff = difference(&rtp_time, ¤t_time); + if (diff > 0) + g_usleep(diff); gettimeofday(&raop_session->play_state.last_send, NULL); while (rd) { |