mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
[Bugfix] FS#13492 - Playback resume fails after USB insert
On usb plug system_flush() gets called before the other threads get a chance to ACK the insert system_flush() calls playlist_shutdown() (amongst other things) playlist_shutdown closes the control file the audio thread acks USB insert audio_stop_playback is called which now can't look up the filename from the now closed handle for control the control file I left the guard for checking for USB insert but it appears to be fine without it Change-Id: I935dbf7aed38d4a57413c0063ad953f427e9b3bb
This commit is contained in:
parent
e6313e4b8e
commit
f55cb77f89
1 changed files with 5 additions and 1 deletions
|
|
@ -1949,10 +1949,14 @@ void playlist_init(void)
|
|||
* Clean playlist at shutdown
|
||||
*/
|
||||
void playlist_shutdown(void)
|
||||
|
||||
{
|
||||
/*BugFix we need to save resume info first */
|
||||
/*if (usb_detect() == USB_INSERTED)*/
|
||||
audio_stop();
|
||||
struct playlist_info* playlist = ¤t_playlist;
|
||||
playlist_write_lock(playlist);
|
||||
|
||||
logf("Closing Control %s", __func__);
|
||||
if (playlist->control_fd >= 0)
|
||||
pl_close_control(playlist);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue