From 8268a7a20e50ed71bce747f51e77dc023f93dcb7 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Tue, 11 Oct 2011 17:42:35 +0200 Subject: [PATCH] discoverer: Only call gst_video_info_from_caps on raw video --- gst-libs/gst/pbutils/gstdiscoverer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/pbutils/gstdiscoverer.c b/gst-libs/gst/pbutils/gstdiscoverer.c index 6a1dbc8..1aa1f92 100644 --- a/gst-libs/gst/pbutils/gstdiscoverer.c +++ b/gst-libs/gst/pbutils/gstdiscoverer.c @@ -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; -- 2.7.4