From 78875532684a55f009688e975b1be640b763716d Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Thu, 10 Nov 2005 12:57:01 +0000 Subject: [PATCH] sys/v4l/gstv4lsrc.c: Check if the caps have a fourcc field. Fixes crash for gst-launch-0.9 v4lsrc name=source autopr... Original commit message from CVS: * sys/v4l/gstv4lsrc.c: (gst_v4lsrc_fixate): Check if the caps have a fourcc field. Fixes crash for gst-launch-0.9 v4lsrc name=source autoprobe=false autoprobe-fps=false copy-mode=1 device=/dev/video0 ! ffmpegcolorspace ! "video/x-raw-yuv, format=(fourcc)I420" ! xvimagesink --- ChangeLog | 7 +++++++ sys/v4l/gstv4lsrc.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f527fd6a7e..a34368eba9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-11-10 Thomas Vander Stichele + + * sys/v4l/gstv4lsrc.c: (gst_v4lsrc_fixate): + Check if the caps have a fourcc field. Fixes crash for + gst-launch-0.9 v4lsrc name=source autoprobe=false autoprobe-fps=false copy-mode=1 device=/dev/video0 ! ffmpegcolorspace ! + "video/x-raw-yuv, format=(fourcc)I420" ! xvimagesink + 2005-11-10 Tim-Philipp Müller * gst/sine/gstsinesrc.c: (gst_sinesrc_class_init), diff --git a/sys/v4l/gstv4lsrc.c b/sys/v4l/gstv4lsrc.c index fcd83b145b..66fe2eb850 100644 --- a/sys/v4l/gstv4lsrc.c +++ b/sys/v4l/gstv4lsrc.c @@ -242,7 +242,7 @@ gst_v4lsrc_fixate (GstPad * pad, GstCaps * caps) 7.5); v = gst_structure_get_value (structure, "format"); - if (G_VALUE_TYPE (v) != GST_TYPE_FOURCC) { + if (v && G_VALUE_TYPE (v) != GST_TYPE_FOURCC) { guint32 fourcc; g_return_if_fail (G_VALUE_TYPE (v) == GST_TYPE_LIST);