summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-11-05 07:43:39 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-11-05 07:43:39 +0000
commit319d5f71011321053ba41775182543c534da9913 (patch)
treea6b08d859186e0671b5f4b8066080c5fcb313413 /firmware
parentb109e9305495e9a76137fca359aa363f4a2860fc (diff)
downloadrockbox-319d5f71011321053ba41775182543c534da9913.tar.gz
rockbox-319d5f71011321053ba41775182543c534da9913.zip
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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/mpeg.c8
1 files changed, 4 insertions, 4 deletions
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)
860 steps--; 860 steps--;
861 else 861 else
862 steps++; 862 steps++;
863
864 /* Bail out if no file could be opened */
865 if(abs(steps) > max_steps)
866 return -1;
867 } 863 }
868 else 864 else
869 { 865 {
@@ -895,6 +891,10 @@ static int new_file(int steps)
895 891
896 } 892 }
897 } 893 }
894
895 /* Bail out if no file could be opened */
896 if(abs(steps) > max_steps)
897 return -1;
898 } while ( mpeg_file < 0 ); 898 } while ( mpeg_file < 0 );
899 899
900 return 0; 900 return 0;