rtsp_client: don't wait if packet is over due
Check if the time difference is negative. That would have caused sleeping forever.
This commit is contained in:
parent
f3ac8a7cd9
commit
2525d32e17
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue