From: Tilman Sauerbeck Date: Thu, 17 Aug 2006 17:57:20 +0000 (+0200) Subject: Slightly reworked the final write loop. X-Git-Tag: ruby-vorbistagger-0.0.1~15 X-Git-Url: http://git.code-monkey.de/?p=ruby-vorbistagger.git;a=commitdiff_plain;h=2a86264bbe06e4e24e86170ece78e0ed8bf24e32 Slightly reworked the final write loop. --- diff --git a/ext/vcedit.c b/ext/vcedit.c index 70eae05..75bf80d 100644 --- a/ext/vcedit.c +++ b/ext/vcedit.c @@ -512,7 +512,7 @@ vcedit_write (vcedit_state *state) /* clear it, because not all paths to here do */ state->eosin = 0; - while (!state->eosin) { /* We reached eos, not eof */ + do { /* We copy the rest of the stream (other logical streams) * through, a page at a time. */ @@ -537,7 +537,7 @@ vcedit_write (vcedit_state *state) ogg_sync_wrote (&state->oy, bytes); state->eosin = !bytes && feof (state->in); - } + } while (!state->eosin); fclose (out); fclose (state->in);