if (--state->refcount)
return;
- vcedit_clear_internals (state);
+ if (state->opened)
+ vcedit_clear_internals (state);
+
vcedit_state_free (state);
}
/* Bail if we don't find data in the first 40 kB */
if (chunks++ >= 10) {
- ret = VCEDIT_ERR_INVAL;
+ ogg_sync_clear (state->oy);
- goto err;
+ return VCEDIT_ERR_INVAL;
}
}