From 66ba15d0d5f7e8278f88962bac2d60a725244a10 Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Thu, 17 Aug 2006 17:40:31 +0200 Subject: [PATCH] Made MainTest#test_open_non_ogg_file pass. --- ext/vcedit.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ext/vcedit.c b/ext/vcedit.c index 22a8271..1aee14c 100644 --- a/ext/vcedit.c +++ b/ext/vcedit.c @@ -162,7 +162,9 @@ vcedit_state_unref (vcedit_state *state) if (--state->refcount) return; - vcedit_clear_internals (state); + if (state->opened) + vcedit_clear_internals (state); + vcedit_state_free (state); } @@ -301,9 +303,9 @@ vcedit_open (vcedit_state *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; } } -- 2.30.2