gst/playback/gstplaybasebin.c: Fix for #162924 - free caps after use, not before
authorTim-Philipp Müller <t.i.m@zen.co.uk>
Wed, 5 Jan 2005 10:11:23 +0000 (10:11 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Wed, 5 Jan 2005 10:11:23 +0000 (10:11 +0000)
Original commit message from CVS:

patch by: Tim-Philipp Müller  <t.i.m@zen.co.uk>

* gst/playback/gstplaybasebin.c:
Fix for #162924 - free caps after use, not before

ChangeLog
gst/playback/gstplaybasebin.c

index 6ace607..d4b2ef1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-01-05  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+       patch by: Tim-Philipp Müller  <t.i.m@zen.co.uk>
+
+       * gst/playback/gstplaybasebin.c:
+        Fix for #162924 - free caps after use, not before
+
 2005-01-04  Thomas Vander Stichele  <thomas at apestaart dot org>
 
        patch by: Ronald Bultje <rbultje@ronald.bitfreak.net>
index 39b22b2..faa166c 100644 (file)
@@ -970,7 +970,6 @@ setup_source (GstPlayBaseBin * play_base_bin, GError ** error)
       }
 
       structure = gst_caps_get_structure (caps, 0);
-      gst_caps_free (caps);
       mimetype = gst_structure_get_name (structure);
 
       if (g_str_has_prefix (mimetype, "audio/x-raw") ||
@@ -979,6 +978,8 @@ setup_source (GstPlayBaseBin * play_base_bin, GError ** error)
             play_base_bin);
         is_raw = TRUE;
       }
+
+      gst_caps_free (caps);
     }
     if (is_raw) {
       no_more_pads (play_base_bin->source, play_base_bin);