diff --git a/lib/rb-gst-media-types.c b/lib/rb-gst-media-types.c
index 65ea345..350552e 100644
--- a/lib/rb-gst-media-types.c
+++ b/lib/rb-gst-media-types.c
@@ -102,16 +102,20 @@ rb_gst_caps_to_media_type (const GstCaps *caps)
 	 * there are only a couple of special cases.
 	 */
 
-	if (gst_caps_get_size (caps) == 0)
+	if (gst_caps_get_size (caps) == 0) {
+		rb_debug ("zero size caps?");
 		return NULL;
+		}
 
 	s = gst_caps_get_structure (caps, 0);
 	media_type = gst_structure_get_name (s);
 	if (media_type == NULL) {
+		rb_debug ("first caps structure has no name?");
 		return NULL;
 	} else if (g_str_has_prefix (media_type, "audio/x-raw-") ||
 	    g_str_has_prefix (media_type, "video/x-raw-")) {
 		/* ignore raw types */
+		rb_debug ("raw audio/video");
 		return NULL;
 	} else if (g_str_equal (media_type, "audio/mpeg")) {
 		/* need to distinguish between mpeg 1 layer 3 and
@@ -231,11 +235,15 @@ rb_gst_media_type_matches_profile (GstEncodingProfile *profile, const char *medi
 char *
 rb_gst_encoding_profile_get_media_type (GstEncodingProfile *profile)
 {
+	rb_debug ("profile: %s", gst_encoding_profile_get_name (profile));
 	if (GST_IS_ENCODING_CONTAINER_PROFILE (profile)) {
+		rb_debug ("is container");
 		const GList *cl = gst_encoding_container_profile_get_profiles (GST_ENCODING_CONTAINER_PROFILE (profile));
 		for (; cl != NULL; cl = cl->next) {
 			GstEncodingProfile *p = cl->data;
+			rb_debug ("stream: %s", gst_encoding_profile_get_name (p));
 			if (GST_IS_ENCODING_AUDIO_PROFILE (p)) {
+				rb_debug ("is audio profile");
 				return rb_gst_caps_to_media_type (gst_encoding_profile_get_format (p));
 			}
 
@@ -244,6 +252,7 @@ rb_gst_encoding_profile_get_media_type (GstEncodingProfile *profile)
 		/* now what? */
 		return NULL;
 	} else {
+		rb_debug ("not container");
 		return rb_gst_caps_to_media_type (gst_encoding_profile_get_format (profile));
 	}
 }
