GstPad *thepad;
GstBuffer *hbuf;
GstMapInfo map;
-#ifndef GST_DISABLE_DEBUG
GstCaps *caps;
- const gchar *mime_type;
-#endif
+ const gchar *mime_type = "";
pad = (GstOggPadData *) walk->data;
thepad = pad->collect.pad;
-#ifndef GST_DISABLE_DEBUG
- if ((caps = gst_pad_get_current_caps (thepad))) {
- GstStructure *structure = gst_caps_get_structure (caps, 0);
- mime_type = gst_structure_get_name (structure);
- gst_caps_unref (caps);
- } else {
- mime_type = "";
- }
-#endif
-
walk = walk->next;
pad->packetno = 0;
continue;
}
+ if ((caps = gst_pad_get_current_caps (thepad))) {
+ GstStructure *structure = gst_caps_get_structure (caps, 0);
+ mime_type = gst_structure_get_name (structure);
+ }
+
/* create a packet from the buffer */
gst_buffer_map (buf, &map, GST_MAP_READ);
packet.packet = map.data;
} else {
hbufs = g_list_append (hbufs, hbuf);
}
+
+ if (caps) {
+ gst_caps_unref (caps);
+ }
}
/* The Skeleton BOS goes first - even before the video that went first before */