From c44d982b24caf2bf00c99e357b3b814fb5cffc04 Mon Sep 17 00:00:00 2001 From: Haesu Gwon Date: Wed, 29 Jun 2022 13:36:48 +0900 Subject: [PATCH] Fix bug when audio clip is added - When video clip is added, we set its position as top-left(0,0). But, currently, position is set even if it's audio clip. So we need to check clip type and set position only if clip is video. [Version] 0.0.13 [Issue Type] Bug fix Change-Id: Ib7d3568314be448ef98d503ddce34f1d9d2c6976 --- packaging/capi-media-editor.spec | 2 +- src/media_editor_clip.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/capi-media-editor.spec b/packaging/capi-media-editor.spec index 4aae0ec..0fc3185 100644 --- a/packaging/capi-media-editor.spec +++ b/packaging/capi-media-editor.spec @@ -1,6 +1,6 @@ Name: capi-media-editor Summary: A Tizen Media Editor API -Version: 0.0.12 +Version: 0.0.13 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/media_editor_clip.c b/src/media_editor_clip.c index 721d36f..4e566d2 100644 --- a/src/media_editor_clip.c +++ b/src/media_editor_clip.c @@ -281,8 +281,8 @@ int _mediaeditor_add_clip(mediaeditor_s *editor, const char *path, unsigned int ret = _mediaeditor_create_clip_common(editor, clip, MEDIAEDITOR_EFFECT_TYPE_NONE, clip_id); RET_VAL_IF(ret != MEDIAEDITOR_ERROR_NONE, ret, "failed to create clip common"); - ret = _mediaeditor_set_clip_position(editor, *clip_id, 0, 0); - RET_VAL_IF(ret != MEDIAEDITOR_ERROR_NONE, ret, "failed to set initial position"); + if (__has_video_track(clip)) + ges_timeline_element_set_child_properties(GES_TIMELINE_ELEMENT(clip), "posx", 0, "posy", 0, NULL); return MEDIAEDITOR_ERROR_NONE; } -- 2.7.4