summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2015-06-19 17:37:42 (GMT)
committerThibault Saunier <tsaunier@gnome.org>2015-06-19 17:38:21 (GMT)
commit40c247b783fca9b1f9f0662f733ae83c85650a90 (patch)
treed5e3b31e5bc23baed30dd797a05a3b9f72d3f11c
parentd03ce6fd2c0104477456a826184ebaa9a90b63bf (diff)
downloadWebKit-40c247b783fca9b1f9f0662f733ae83c85650a90.tar.gz
WebKit-40c247b783fca9b1f9f0662f733ae83c85650a90.tar.xz
[GSteamer] Do not try to get image size out of not video caps
Avoiding to be flooded by GST_ERROR message when debugging
-rw-r--r--Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp b/Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp
index a6aae02..0d241ef 100644
--- a/Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp
+++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp
@@ -52,7 +52,10 @@ bool getVideoSizeAndFormatFromCaps(GstCaps* caps, WebCore::IntSize& size, GstVid
{
GstVideoInfo info;
- if (!gst_caps_is_fixed(caps) || !gst_video_info_from_caps(&info, caps))
+
+ if (!gst_caps_is_fixed(caps) ||
+ !gst_structure_has_name(gst_caps_get_structure(caps, 0), "video/x-raw")
+ || !gst_video_info_from_caps(&info, caps))
return false;
format = GST_VIDEO_INFO_FORMAT(&info);