mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-24 22:25:56 -05:00
Make event logs register correctly, turn down the select error on windows rendezvous, and fix crash on short mp3 files.
This commit is contained in:
parent
30ddac3253
commit
a1c2a47f2b
@ -110,6 +110,7 @@ void os_deinit(void) {
|
||||
* open the syslog (eventlog)
|
||||
*/
|
||||
int os_opensyslog(void) {
|
||||
elog_register();
|
||||
return elog_init();
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ void *rend_mainthread(void *arg) {
|
||||
|
||||
// myTimerCallBack();
|
||||
} else {
|
||||
DPRINTF(E_LOG,L_REND,"select() returned %d errno %d %s\n", result, errno, strerror(errno));
|
||||
DPRINTF(E_INF,L_REND,"select() returned %d errno %d %s\n", result, errno, strerror(errno));
|
||||
if (errno != EINTR) rend_stop_flag = 1;
|
||||
}
|
||||
}
|
||||
|
@ -978,8 +978,7 @@ int scan_mp3_get_mp3fileinfo(char *file, MP3FILE *pmp3) {
|
||||
|
||||
/* back-calculate bitrate from duration */
|
||||
if(pmp3->song_length) { /* could still be unknown */
|
||||
pmp3->bitrate = ((file_size / 1000) * 8) /
|
||||
(pmp3->song_length / 1000);
|
||||
pmp3->bitrate = (file_size / pmp3->song_length) * 8;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user