SAFE_FREE(title);
} else {
media_svc_error("Can't extract title");
- ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.title, MEDIA_SVC_TAG_UNKNOWN);
- media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+ content_info->media_meta.title = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+ media_svc_retv_del_if(content_info->media_meta.title == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
}
/* Set default value before extracting meta information */
- ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.description, MEDIA_SVC_TAG_UNKNOWN);
- media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+ content_info->media_meta.description = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+ media_svc_retv_del_if(content_info->media_meta.description == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
- ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.copyright, MEDIA_SVC_TAG_UNKNOWN);
- media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+ content_info->media_meta.copyright = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+ media_svc_retv_del_if(content_info->media_meta.copyright == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
- ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.track_num, MEDIA_SVC_TAG_UNKNOWN);
- media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+ content_info->media_meta.track_num = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+ media_svc_retv_del_if(content_info->media_meta.track_num == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
- ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.album, MEDIA_SVC_TAG_UNKNOWN);
- media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+ content_info->media_meta.album = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+ media_svc_retv_del_if(content_info->media_meta.album == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
- ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.artist, MEDIA_SVC_TAG_UNKNOWN);
- media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+ content_info->media_meta.artist = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+ media_svc_retv_del_if(content_info->media_meta.artist == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
- ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.album_artist, MEDIA_SVC_TAG_UNKNOWN);
- media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+ content_info->media_meta.album_artist = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+ media_svc_retv_del_if(content_info->media_meta.album_artist == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
- ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.genre, MEDIA_SVC_TAG_UNKNOWN);
- media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+ content_info->media_meta.genre = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+ media_svc_retv_del_if(content_info->media_meta.genre == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
- ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.composer, MEDIA_SVC_TAG_UNKNOWN);
- media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+ content_info->media_meta.composer = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+ media_svc_retv_del_if(content_info->media_meta.composer == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
- ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.year, MEDIA_SVC_TAG_UNKNOWN);
- media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+ content_info->media_meta.year = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+ media_svc_retv_del_if(content_info->media_meta.year == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
if (refresh) {
media_svc_debug("refresh");