Report the media type in an "unsupported media type" error
authorMikko Rasa <mikko.rasa@movial.fi>
Thu, 20 Nov 2008 10:41:33 +0000 (12:41 +0200)
committerMikko Rasa <mikko.rasa@movial.fi>
Thu, 20 Nov 2008 10:41:33 +0000 (12:41 +0200)
src/octopus-backend-gst.c

index c555e63..d5c577c 100644 (file)
@@ -718,15 +718,22 @@ continue_route_from_pad(OctopusBackend *backend,
     }
     gst_object_unref(factory);
   }
-  gst_caps_unref(caps);
 
   if(chain) {
     realize_component_chain(backend, route, chain, srcpad);
     g_slist_free(chain);
   } else {
+    gchar *caps_str;
+    gchar *msg;
+
     g_debug("Unable to continue route");
-    octopus_route_playback_error(route, "Unable to build route: unsupported media type");
+    caps_str = gst_caps_to_string(caps);
+    msg = g_strdup_printf("Unable to build route: unsupported media type (%s)", caps_str);
+    octopus_route_playback_error(route, msg);
+    g_free(caps_str);
+    g_free(msg);
   }
+  gst_caps_unref(caps);
 }
 
 static void