summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2017-08-04 02:08:38 (GMT)
committerMinje Ahn <minje.ahn@samsung.com>2017-08-04 05:21:59 (GMT)
commit360b4a11fd2d80a7949dcf1c1a9e387648ce059e (patch)
treec2aa5489c9d501d33d6548519de7a551c57d66ad /src
parent8df942537485927f0a58f50873cb133a3cc39a62 (diff)
downloadlibmedia-thumbnail-360b4a11fd2d80a7949dcf1c1a9e387648ce059e.zip
libmedia-thumbnail-360b4a11fd2d80a7949dcf1c1a9e387648ce059e.tar.gz
libmedia-thumbnail-360b4a11fd2d80a7949dcf1c1a9e387648ce059e.tar.bz2
Use request_id instead of full path Change-Id: I2e12d7b1c610d6686cf685f0b32c29bfdb9b804d Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/ipc/media-thumb-ipc.c4
-rwxr-xr-xsrc/media-thumbnail.c9
2 files changed, 4 insertions, 9 deletions
diff --git a/src/ipc/media-thumb-ipc.c b/src/ipc/media-thumb-ipc.c
index a897c18..46f7ae8 100755
--- a/src/ipc/media-thumb-ipc.c
+++ b/src/ipc/media-thumb-ipc.c
@@ -751,7 +751,7 @@ int _media_thumb_request_async(int msg_type, unsigned int request_id, const char
thumb_retvm_if(thumb_req == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "Failed to create request element");
thumb_req->msg_type = msg_type;
- thumb_req->path = strdup(origin_path);
+ thumb_req->path = g_strdup(origin_path);
thumb_req->userData = userData;
thumb_req->isCanceled = false;
thumb_req->isRequested= false;
@@ -787,7 +787,7 @@ int _media_thumb_request_raw_data_async(int msg_type, int request_id, const char
thumb_req->msg_type = msg_type;
thumb_req->request_id = request_id;
- thumb_req->path = strdup(origin_path);
+ thumb_req->path = g_strdup(origin_path);
thumb_req->width = width;
thumb_req->height = height;
thumb_req->userData = userData;
diff --git a/src/media-thumbnail.c b/src/media-thumbnail.c
index b690f4c..d481eed 100755
--- a/src/media-thumbnail.c
+++ b/src/media-thumbnail.c
@@ -150,16 +150,11 @@ int thumbnail_request_extract_raw_data_async(int request_id, const char *origin_
return MS_MEDIA_ERR_NONE;
}
-int thumbnail_request_cancel_media(unsigned int request_id, const char *origin_path)
+int thumbnail_request_cancel_media(unsigned int request_id)
{
int err = MS_MEDIA_ERR_NONE;
- if (origin_path == NULL) {
- thumb_err("Invalid parameter");
- return MS_MEDIA_ERR_INVALID_PARAMETER;
- }
-
- err = _media_thumb_request_async(THUMB_REQUEST_CANCEL_MEDIA, request_id, origin_path, NULL, 0);
+ err = _media_thumb_request_async(THUMB_REQUEST_CANCEL_MEDIA, request_id, NULL, NULL, 0);
if (err != MS_MEDIA_ERR_NONE) {
thumb_err("_media_thumb_request failed : %d", err);
return err;