Slightly reworked the final write loop.
authorTilman Sauerbeck <tilman@code-monkey.de>
Thu, 17 Aug 2006 17:57:20 +0000 (19:57 +0200)
committerTilman Sauerbeck <tilman@code-monkey.de>
Wed, 23 Aug 2006 17:39:15 +0000 (19:39 +0200)
ext/vcedit.c

index 70eae0591af0e91ac5dee35e9858fb3aaa7e80cf..75bf80db99aac4b3205172cb5c14b520b4d9193a 100644 (file)
@@ -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);