Fix build warnings 06/44006/1
authorJeongmo Yang <jm80.yang@samsung.com>
Thu, 16 Jul 2015 06:20:27 +0000 (15:20 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Thu, 16 Jul 2015 06:20:27 +0000 (15:20 +0900)
Change-Id: I7b753c6b5017b5ece6c545d02457a49b1a83d10b
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
src/mm_camcorder_gstcommon.c
src/mm_camcorder_util.c

index 45bb18b..845e970 100644 (file)
@@ -1466,6 +1466,7 @@ static GstPadProbeReturn __mmcamcorder_video_dataprobe_preview(GstPad *pad, GstP
                unsigned int fourcc = 0;
                MMCamcorderVideoStreamDataType stream;
                MMVideoBuffer *mm_buf = NULL;
+               const gchar *string_format = NULL;
 
                state = _mmcamcorder_get_state((MMHandleType)hcamcorder);
                if (state < MM_CAMCORDER_STATE_PREPARE) {
@@ -1485,9 +1486,17 @@ static GstPadProbeReturn __mmcamcorder_video_dataprobe_preview(GstPad *pad, GstP
                structure = gst_caps_get_structure( caps, 0 );
                gst_structure_get_int(structure, "width", &(stream.width));
                gst_structure_get_int(structure, "height", &(stream.height));
-               fourcc = _mmcamcorder_convert_fourcc_string_to_value(gst_structure_get_string(structure, "format"));
+               string_format = gst_structure_get_string(structure, "format");
+               if (string_format == NULL) {
+                       gst_caps_unref(caps);
+                       caps = NULL;
+                       _mmcam_dbg_warn("get string error!!");
+                       return GST_PAD_PROBE_OK;
+               }
+
+               fourcc = _mmcamcorder_convert_fourcc_string_to_value(string_format);
                stream.format = _mmcamcorder_get_pixtype(fourcc);
-               gst_caps_unref( caps );
+               gst_caps_unref(caps);
                caps = NULL;
 
                /*
index 87da365..2f1740e 100644 (file)
@@ -121,9 +121,10 @@ static int __gdbus_method_call_sync(const char* bus_name, const char* object, co
        _mmcam_dbg_log("Dbus call with obj : '%s' iface : '%s' method : '%s'", object, iface, method);
 
        if (is_sync) {
-               if (dbus_reply = g_dbus_connection_call_sync(conn, bus_name, object, iface, \
-                                    method, args,\
-                                    NULL, G_DBUS_CALL_FLAGS_NONE, G_DBUS_REPLY_TIMEOUT, NULL, &err )) {
+               dbus_reply = g_dbus_connection_call_sync(conn, bus_name, object, iface,
+                                                        method, args, NULL, G_DBUS_CALL_FLAGS_NONE,
+                                                        G_DBUS_REPLY_TIMEOUT, NULL, &err);
+               if (dbus_reply) {
                        _mmcam_dbg_log("Method Call '%s.%s' Success", iface, method);
                        *result = dbus_reply;
                } else {