playback.c use file_exists rather than open to check for bad files
the worst case is really slow for open Change-Id: Ifcfe366ad9bee7ff43a0572e52f15b5c6f608288
This commit is contained in:
parent
603412f447
commit
359c66982f
1 changed files with 7 additions and 5 deletions
|
@ -1907,11 +1907,13 @@ static int audio_load_track(void)
|
|||
break;
|
||||
|
||||
/* Test for broken playlists by probing for the files */
|
||||
fd = open(path, O_RDONLY);
|
||||
if (fd >= 0)
|
||||
break;
|
||||
|
||||
logf("Open failed");
|
||||
if (file_exists(path))
|
||||
{
|
||||
fd = open(path, O_RDONLY);
|
||||
if (fd >= 0)
|
||||
break;
|
||||
}
|
||||
logf("Open failed %s", path);
|
||||
|
||||
/* only skip if failed track has a successor in playlist */
|
||||
if (!playlist_peek(playlist_peek_offset + 1, NULL, 0))
|
||||
|
|
Loading…
Reference in a new issue