Fix recorded_date error 99/309699/1 accepted/tizen/unified/20240422.153120 accepted/tizen/unified/x/20240423.053021
authorMinje Ahn <minje.ahn@samsung.com>
Mon, 15 Apr 2024 23:30:17 +0000 (08:30 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Mon, 15 Apr 2024 23:30:17 +0000 (08:30 +0900)
Change-Id: I8890988f40098e8cbb4d682538666748081187e1
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
src/media-svc-util.c

index 0473704..60dc92c 100644 (file)
@@ -580,7 +580,7 @@ void _media_svc_extract_audio_metadata(sqlite3 *handle, bool is_direct, media_sv
        if ((mmf_error == FILEINFO_ERROR_NONE) && (size > 0)) {
                if (g_str_has_suffix(content_info->mime_type, "mp4") || g_str_has_suffix(content_info->mime_type, "3gpp")) {
                        /*Creation time format is 20130101 00:00:00 +0000. change it to 2013:01:01 00:00:00  +0000 like exif time format*/
-                       char *p_value = g_strdelimit(g_strdup(p), "", ':');
+                       char *p_value = g_strdelimit(g_strdup(p), "-", ':');
                        content_info->media_meta.recorded_date = g_strdup_printf("%s +0000", p_value);
                        g_free(p_value);
                } else {
@@ -629,7 +629,7 @@ void _media_svc_extract_video_metadata(media_svc_content_info_s *content_info)
                if ((mmf_error == FILEINFO_ERROR_NONE) && (size > 0)) {
                        if (g_str_has_suffix(content_info->mime_type, "mp4") || g_str_has_suffix(content_info->mime_type, "3gpp")) {
                                /*Creation time format is 20130101 00:00:00 +0000. change it to 2013:01:01 00:00:00  +0000 like exif time format*/
-                               char *p_value = g_strdelimit(g_strdup(p), "", ':');
+                               char *p_value = g_strdelimit(g_strdup(p), "-", ':');
                                content_info->media_meta.recorded_date = g_strdup_printf("%s +0000", p_value);
                                g_free(p_value);
                        } else {