ext/mad/gstid3tag.c: Use the correct function to free typefind factory list.
authorMichael Smith <msmith@xiph.org>
Mon, 12 Dec 2005 19:17:11 +0000 (19:17 +0000)
committerMichael Smith <msmith@xiph.org>
Mon, 12 Dec 2005 19:17:11 +0000 (19:17 +0000)
Original commit message from CVS:
* ext/mad/gstid3tag.c: (gst_mad_id3_to_tag_list),
(gst_id3_tag_do_typefind):
Use the correct function to free typefind factory list.

ChangeLog
ext/mad/gstid3tag.c

index 7c19da5..6f002f9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-12-12  Michael Smith  <msmith@fluendo.com>
+
+       * ext/mad/gstid3tag.c: (gst_mad_id3_to_tag_list),
+       (gst_id3_tag_do_typefind):
+         Use the correct function to free typefind factory list.
+
 2005-12-09  Tim-Philipp Müller  <tim at centricular dot net>
 
        * ext/mad/gstmad.c: (gst_mad_src_query):
index e3a069f..9beb58e 100644 (file)
@@ -575,6 +575,9 @@ gst_mad_id3_to_tag_list (const struct id3_tag * tag)
     }
 
     if (strcmp (id, "COMM") == 0) {
+      if (frame->nfields < 4)
+        continue;
+
       ucs4 = id3_field_getfullstring (&frame->fields[3]);
       g_assert (ucs4);
 
@@ -595,6 +598,9 @@ gst_mad_id3_to_tag_list (const struct id3_tag * tag)
       continue;
     }
 
+    if (frame->nfields < 2)
+      continue;
+
     field = &frame->fields[1];
     nstrings = id3_field_getnstrings (field);
 
@@ -1030,7 +1036,7 @@ gst_id3_tag_do_typefind (GstID3Tag * tag, GstBuffer * buffer)
       break;
     walk = g_list_next (walk);
   }
-  g_list_free (type_list);
+  gst_plugin_feature_list_free (type_list);
   if (find.best_probability > 0) {
     return find.caps;
   } else {