From a18ad22b47c63725341bed2a58faef01ca767de2 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Fri, 20 Dec 2013 18:10:14 +0100 Subject: [PATCH] sfdec: make _stop() non fatal when we have an error already Having no open file in _stop() is okay. Just reset state. --- ext/sndfile/gstsfdec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/sndfile/gstsfdec.c b/ext/sndfile/gstsfdec.c index c102681..8271989 100644 --- a/ext/sndfile/gstsfdec.c +++ b/ext/sndfile/gstsfdec.c @@ -394,11 +394,9 @@ gst_sf_dec_stop (GstSFDec * self) { int err = 0; - g_return_val_if_fail (self->file != NULL, FALSE); - GST_INFO_OBJECT (self, "Closing sndfile stream"); - if ((err = sf_close (self->file))) + if (self->file && (err = sf_close (self->file))) goto close_failed; self->file = NULL; -- 2.7.4