1
0
Fork 0
forked from len0rd/rockbox

Added file read error warning

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@898 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2002-06-05 14:34:05 +00:00
parent 0df736faae
commit c7e3675457

View file

@ -377,7 +377,7 @@ static void mpeg_thread(void)
{
DEBUGF("R\n");
len = read(mpeg_file, mp3buf+mp3buf_write, amount_to_read);
if(len)
if(len > 0)
{
DEBUGF("B\n");
bitswap(mp3buf + mp3buf_write, len);
@ -405,6 +405,11 @@ static void mpeg_thread(void)
}
else
{
if(len < 0)
{
DEBUGF("MPEG read error\n");
}
close(mpeg_file);
mpeg_file = -1;