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:
parent
0df736faae
commit
c7e3675457
1 changed files with 6 additions and 1 deletions
|
|
@ -377,7 +377,7 @@ static void mpeg_thread(void)
|
||||||
{
|
{
|
||||||
DEBUGF("R\n");
|
DEBUGF("R\n");
|
||||||
len = read(mpeg_file, mp3buf+mp3buf_write, amount_to_read);
|
len = read(mpeg_file, mp3buf+mp3buf_write, amount_to_read);
|
||||||
if(len)
|
if(len > 0)
|
||||||
{
|
{
|
||||||
DEBUGF("B\n");
|
DEBUGF("B\n");
|
||||||
bitswap(mp3buf + mp3buf_write, len);
|
bitswap(mp3buf + mp3buf_write, len);
|
||||||
|
|
@ -405,6 +405,11 @@ static void mpeg_thread(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if(len < 0)
|
||||||
|
{
|
||||||
|
DEBUGF("MPEG read error\n");
|
||||||
|
}
|
||||||
|
|
||||||
close(mpeg_file);
|
close(mpeg_file);
|
||||||
mpeg_file = -1;
|
mpeg_file = -1;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue