From: Javier Viguera Date: Mon, 25 Nov 2013 10:26:37 +0100 Subject: [PATCH] meta-fsl-arm: fix segment fault in v4lsink for yocto Signed-off-by: Javier Viguera --- src/misc/v4l_sink/src/mfw_gst_fb.c | 4 +++- src/misc/v4l_sink/src/mfw_gst_v4lsink.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/misc/v4l_sink/src/mfw_gst_fb.c b/src/misc/v4l_sink/src/mfw_gst_fb.c index 8c251da..291c2a1 100755 --- a/src/misc/v4l_sink/src/mfw_gst_fb.c +++ b/src/misc/v4l_sink/src/mfw_gst_fb.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2011 Freescale Semiconductor, Inc. All rights reserved. + * Copyright (c) 2009-2012, Freescale Semiconductor, Inc. All rights reserved. * */ @@ -236,6 +236,8 @@ gboolean mfw_gst_fb0_get_resolution(MFW_GST_V4LSINK_INFO_T *v4l) ret = ioctl(v4l->fd_fb, FBIOGET_VSCREENINFO, &fb_var); if (ret < 0) { g_print("Unable to get resolution value\n"); + v4l->fullscreen_width = 1024; + v4l->fullscreen_height = 768; return FALSE; } v4l->fullscreen_width = fb_var.xres; diff --git a/src/misc/v4l_sink/src/mfw_gst_v4lsink.c b/src/misc/v4l_sink/src/mfw_gst_v4lsink.c index c6a6b6c..dfdb926 100755 --- a/src/misc/v4l_sink/src/mfw_gst_v4lsink.c +++ b/src/misc/v4l_sink/src/mfw_gst_v4lsink.c @@ -1431,7 +1431,7 @@ mfw_gst_v4lsink_change_state (GstElement * element, GstStateChange transition) g_mutex_lock (v4l_info->flow_lock); v4l_info->gstXInfo->running = FALSE; g_mutex_unlock (v4l_info->flow_lock); - if (v4l_info->x11enabled) { + if ((v4l_info->x11enabled) && (v4l_info->gstXInfo) && (v4l_info->gstXInfo->event_thread)) { g_thread_join (v4l_info->gstXInfo->event_thread); } if (v4l_info->gstXInfo->xwindow) {