discoverer: Only call gst_video_info_from_caps on raw video

This commit is contained in:
Edward Hervey 2011-10-11 17:42:35 +02:00
parent 6eb5f5b13e
commit 8268a7a20e

View 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;