sfdec: make _stop() non fatal when we have an error already

Having no open file in _stop() is okay. Just reset state.
This commit is contained in:
Stefan Sauer 2013-12-20 18:10:14 +01:00
parent 0c34d807d4
commit a18ad22b47

View file

@ -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;