discoverer: Only call gst_video_info_from_caps on raw video
authorEdward Hervey <edward.hervey@collabora.co.uk>
Tue, 11 Oct 2011 15:42:35 +0000 (17:42 +0200)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Tue, 11 Oct 2011 15:42:35 +0000 (17:42 +0200)
gst-libs/gst/pbutils/gstdiscoverer.c

index 6a1dbc8..1aa1f92 100644 (file)
@@ -692,7 +692,11 @@ collect_information (GstDiscoverer * dc, const GstStructure * st,
       info->parent.caps = caps;
     }
 
-    if (gst_video_info_from_caps (&vinfo, caps)) {
+    /* FIXME : gst_video_info_from_caps only works with raw caps,
+     * wouldn't we want to get all the info below for non-raw caps ? 
+     */
+    if (g_str_has_prefix (name, "video/x-raw") &&
+        gst_video_info_from_caps (&vinfo, caps)) {
       info->width = (guint) vinfo.width;
       info->height = (guint) vinfo.height;