typefindfunctions: aac: don't try to unref NULL caps
authorTim-Philipp Müller <tim@centricular.net>
Wed, 12 Dec 2012 15:31:20 +0000 (15:31 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Wed, 12 Dec 2012 15:31:20 +0000 (15:31 +0000)
gst/typefind/gsttypefindfunctions.c

index 0b74981..9203bcc 100644 (file)
@@ -1040,7 +1040,7 @@ aac_type_find (GstTypeFind * tf, gpointer unused)
         count = aac_type_find_scan_loas_frames (tf, &c, 20);
 
       if (count >= 3 && count > best_count) {
-        gst_caps_unref (best_caps);
+        gst_caps_replace (&best_caps, NULL);
         best_caps = gst_caps_new_simple ("audio/mpeg",
             "framed", G_TYPE_BOOLEAN, FALSE,
             "mpegversion", G_TYPE_INT, 4,