- state->oy = malloc (sizeof (ogg_sync_state));
- ogg_sync_init (state->oy);
-
- while (1) {
- buffer = ogg_sync_buffer (state->oy, CHUNKSIZE);
- bytes = fread (buffer, 1, CHUNKSIZE, state->in);
-
- ogg_sync_wrote (state->oy, bytes);
+ state->in = fopen (state->filename, "rb");
+ if (!state->in)
+ return VCEDIT_ERR_OPEN;