From 319d5f71011321053ba41775182543c534da9913 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Fri, 5 Nov 2004 07:43:39 +0000 Subject: new_file() now correctly bails out if all files in the playlist are corrupt. This fixes bug report #1060753. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5383 a1c6a512-1295-4272-9138-f99709370657 --- firmware/mpeg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'firmware') diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 37539ff036..2ad708d6d7 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c @@ -860,10 +860,6 @@ static int new_file(int steps) steps--; else steps++; - - /* Bail out if no file could be opened */ - if(abs(steps) > max_steps) - return -1; } else { @@ -895,6 +891,10 @@ static int new_file(int steps) } } + + /* Bail out if no file could be opened */ + if(abs(steps) > max_steps) + return -1; } while ( mpeg_file < 0 ); return 0; -- cgit v1.2.3