ext/raw1394/gstdv1394src.c: Free handles that we allocated when exiting via the error...
authorJan Schmidt <thaytan@mad.scientist.com>
Wed, 7 Mar 2007 19:48:03 +0000 (19:48 +0000)
committerJan Schmidt <thaytan@mad.scientist.com>
Wed, 7 Mar 2007 19:48:03 +0000 (19:48 +0000)
Original commit message from CVS:
* ext/raw1394/gstdv1394src.c: (gst_dv1394src_start):
Free handles that we allocated when exiting via the error paths.

ChangeLog
common
ext/raw1394/gstdv1394src.c

index bcd3100..aa4e94c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-07  Jan Schmidt  <thaytan@mad.scientist.com>
+
+       * ext/raw1394/gstdv1394src.c: (gst_dv1394src_start):
+       Free handles that we allocated when exiting via the error paths.
+
 2007-03-07  Stefan Kost  <ensonic@users.sf.net>
 
        * gst/level/gstlevel.c: (gst_level_class_init),
diff --git a/common b/common
index c4f56a6..7c5a0ab 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit c4f56a657d79aee0e3fc25ef2bcf876f9f3c1593
+Subproject commit 7c5a0ab68de1fed4e5a1fd473160debc2c4c7b89
index 5b0d909..d10c389 100644 (file)
@@ -842,6 +842,8 @@ no_handle:
   }
 no_ports:
   {
+    raw1394_destroy_handle (src->handle);
+    src->handle = NULL;
     GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, (NULL),
         ("no ports available for raw1394"));
     return FALSE;
@@ -854,6 +856,12 @@ cannot_set_port:
   }
 cannot_start:
   {
+    raw1394_destroy_handle (src->handle);
+    src->handle = NULL;
+#ifdef HAVE_LIBIEC61883
+    iec61883_dv_fb_close (src->iec61883dv);
+    src->iec61883dv = NULL;
+#endif
     GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
         ("can't start 1394 iso receive"));
     return FALSE;
@@ -861,6 +869,8 @@ cannot_start:
 #ifdef HAVE_LIBIEC61883
 cannot_initialise_dv:
   {
+    raw1394_destroy_handle (src->handle);
+    src->handle = NULL;
     GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
         ("can't initialise iec61883 dv"));
     return FALSE;