fix lost page (before eof)

This commit is contained in:
Frédéric Mangano 2013-01-01 16:54:36 +01:00
parent 20d6048504
commit 530a4eab23

View File

@ -140,9 +140,11 @@ int main(int argc, char **argv){
size_t len;
char *error = NULL;
int packet_count = -1;
while(error == NULL && !feof(in)){
while(error == NULL){
// Read until we complete a page.
if(ogg_sync_pageout(&oy, &og) != 1){
if(feof(in))
break;
buf = ogg_sync_buffer(&oy, 65536);
if(buf == NULL){
error = "ogg_sync_buffer: out of memory";