timer_delete() instead of close() for FreeBSD timer

This commit is contained in:
ejurgensen 2014-09-27 23:05:22 +02:00
parent 65110a9f39
commit 861635eb4d
1 changed files with 8 additions and 0 deletions

View File

@ -4749,7 +4749,11 @@ player_init(void)
exit_fail: exit_fail:
evbuffer_free(audio_buf); evbuffer_free(audio_buf);
audio_fail: audio_fail:
#if defined(__linux__)
close(pb_timer_fd); close(pb_timer_fd);
#else
timer_delete(pb_timer);
#endif
return -1; return -1;
} }
@ -4783,7 +4787,11 @@ player_deinit(void)
free(history); free(history);
pb_timer_stop(); pb_timer_stop();
#if defined(__linux__)
close(pb_timer_fd); close(pb_timer_fd);
#else
timer_delete(pb_timer);
#endif
evbuffer_free(audio_buf); evbuffer_free(audio_buf);