[libmm-camcorder] g_free and g_printf function fixes
[platform/core/multimedia/libmm-camcorder.git] / src / mm_camcorder_attribute.c
index e60bf6a..409aba4 100644 (file)
@@ -698,7 +698,7 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        "display-surface",
                        MMF_VALUE_TYPE_INT,
                        MM_ATTRS_FLAG_RW,
-                       {(void*)MM_DISPLAY_SURFACE_X},
+                       {(void*)MM_DISPLAY_SURFACE_OVERLAY},
                        MM_ATTRS_VALID_TYPE_INT_ARRAY,
                        {0},
                        {0},
@@ -2955,11 +2955,8 @@ bool _mmcamcorder_commit_target_filename(MMHandleType handle, int attr_idx, cons
        }
 
        if (sc->info_video) {
-               if (sc->info_video->filename) {
-                       free(sc->info_video->filename);
-                       sc->info_video->filename = NULL;
-               }
-               sc->info_video->filename = strdup(filename);
+               SAFE_G_FREE(sc->info_video->filename);
+               sc->info_video->filename = g_strdup(filename);
                if (sc->info_video->filename == NULL) {
                        _mmcam_dbg_err("failed to strdup filename [%s]", filename);
                        return FALSE;