From 332ab9690fb39775ef3827b65200fd37d0fbdb30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 6 Jul 2018 10:32:24 +0200 Subject: [PATCH] Fix typefind test if typefind factories without caps are available --- gstreamer/src/typefind.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gstreamer/src/typefind.rs b/gstreamer/src/typefind.rs index 30bb853b3..6e3065760 100644 --- a/gstreamer/src/typefind.rs +++ b/gstreamer/src/typefind.rs @@ -248,7 +248,7 @@ mod tests { .cloned() .find(|f| { f.get_caps() - .map(|c| c.get_structure(0).unwrap().get_name() == "application/xml") + .map(|c| c.get_structure(0).map(|s| s.get_name() == "application/xml").unwrap_or(false)) .unwrap_or(false) }) .unwrap();