qtmultimedia: Fix crash when use Gstreamer 0.10 plugin

In QVideoSurfaceGstSink::get_caps(), when use 0.10 version Gstreamer,
It create GstCap with a wrong type (G_TYPE_STRING) of parameter 'format',
a g_strcpy exception will be found.
This patch fixes the parameter type to use GST_TYPE_FOURCC as expacted.

Signed-off-by: Mingtao Qu <zarelaky@hotmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Mingtao Qu
2014-12-18 15:31:08 +08:00
committed by Martin Jansa
parent bb6049fbe1
commit 46c76e43e7

View File

@@ -1321,7 +1321,7 @@ index f3e2d88..a964e82 100644
+#if GST_CHECK_VERSION(1,0,0)
+ "format" , G_TYPE_STRING, gst_video_format_to_string(qt_yuvColorLookup[index].vfmt),
+#else
+ "format" , G_TYPE_STRING, qt_yuvColorLookup[index].fourcc,
+ "format" , GST_TYPE_FOURCC, qt_yuvColorLookup[index].fourcc,
+#endif
NULL));
continue;