Return 0 on EOF in burn_source.

This commit is contained in:
Vreixo Formoso Lopes 2007-10-08 07:57:23 +00:00
parent 0224ad402d
commit 08c53aa997

View File

@ -876,7 +876,7 @@ bs_read_block(struct burn_source *bs)
t->curblock++; t->curblock++;
return t->block_size; return t->block_size;
} }
return -1; return 0;
} }
if (t->state_data_valid) if (t->state_data_valid)
write_data_chunk(t, t->buffer); write_data_chunk(t, t->buffer);
@ -898,8 +898,8 @@ bs_read(struct burn_source *bs, unsigned char *buf, int size)
/* we need to read next block */ /* we need to read next block */
t->bytes_read = 0; t->bytes_read = 0;
ret = bs_read_block(bs); ret = bs_read_block(bs);
if (ret < 0) if (ret <= 0)
return -1; return ret;
} }
int bytes_to_read = 2048 - t->bytes_read; int bytes_to_read = 2048 - t->bytes_read;