mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-04 10:26:02 -05:00
Check for player status after playback_write()
playback_write() can actually stop the player, so check that this did not happen.
This commit is contained in:
parent
4ebbe3696f
commit
576e1cc9ef
@ -961,6 +961,10 @@ player_playback_cb(int fd, short what, void *arg)
|
|||||||
|
|
||||||
playback_write();
|
playback_write();
|
||||||
|
|
||||||
|
/* Make sure playback is still running */
|
||||||
|
if (player_state == PLAY_STOPPED)
|
||||||
|
return;
|
||||||
|
|
||||||
pb_timer_last.tv_nsec += AIRTUNES_V2_STREAM_PERIOD;
|
pb_timer_last.tv_nsec += AIRTUNES_V2_STREAM_PERIOD;
|
||||||
if (pb_timer_last.tv_nsec >= 1000000000)
|
if (pb_timer_last.tv_nsec >= 1000000000)
|
||||||
{
|
{
|
||||||
@ -1011,6 +1015,10 @@ player_playback_cb(int fd, short what, void *arg)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
playback_write();
|
playback_write();
|
||||||
|
|
||||||
|
/* Make sure playback is still running */
|
||||||
|
if (player_state == PLAY_STOPPED)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = event_add(&pb_timer_ev, NULL);
|
ret = event_add(&pb_timer_ev, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user