summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilbok Lee <gilbok.lee@samsung.com>2024-09-30 11:00:25 +0900
committerGilbok Lee <gilbok.lee@samsung.com>2024-09-30 15:53:24 +0900
commit74475bbef3b98cf57177b50bde1eef1e2518ed50 (patch)
tree36b109f74738b03757ed15211836bc713f2af577
parentaf3b573470a01e309462b7545436cc153382d691 (diff)
downloadlibmm-player-tizen_9.0.tar.gz
libmm-player-tizen_9.0.tar.bz2
libmm-player-tizen_9.0.zip
Change-Id: Ib8c507d9e59f0afaa8a6d3a387eeffa40cabed02
-rw-r--r--packaging/libmm-player.spec2
-rw-r--r--src/mm_player_priv.c27
2 files changed, 20 insertions, 9 deletions
diff --git a/packaging/libmm-player.spec b/packaging/libmm-player.spec
index 4b6dfe8..a168908 100644
--- a/packaging/libmm-player.spec
+++ b/packaging/libmm-player.spec
@@ -1,6 +1,6 @@
Name: libmm-player
Summary: Multimedia Framework Player Library
-Version: 1.1.1
+Version: 1.1.2
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0
diff --git a/src/mm_player_priv.c b/src/mm_player_priv.c
index 4f313a5..f465103 100644
--- a/src/mm_player_priv.c
+++ b/src/mm_player_priv.c
@@ -6366,16 +6366,26 @@ _mmplayer_pipeline_complete(GstElement *decodebin, gpointer data)
MMPLAYER_GENERATE_DOT_IF_ENABLED(player, "pipeline-status-complete");
}
-static int
-__mmplayer_check_profile(void)
+static bool
+__mmplayer_is_tv_profile(void)
{
- char *profileName;
+ char *profileName = NULL;
static int profile_tv = -1;
if (__builtin_expect(profile_tv != -1, 1))
- return profile_tv;
+ return (profile_tv == 1);
+
+ if (system_info_get_platform_string("http://tizen.org/feature/profile", &profileName)
+ != SYSTEM_INFO_ERROR_NONE) {
+ LOGE("fail to get profile name");
+ return false;
+ }
+
+ if (!profileName) {
+ LOGE("profileName is NULL");
+ return false;
+ }
- system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
switch (*profileName) {
case 't':
case 'T':
@@ -6385,9 +6395,10 @@ __mmplayer_check_profile(void)
profile_tv = 0;
break;
}
+
free(profileName);
- return profile_tv;
+ return (profile_tv == 1);
}
static gboolean
@@ -6458,7 +6469,7 @@ __mmplayer_verify_gapless_play_path(mmplayer_t *player)
gint count = 0;
gint gapless = 0;
guint num_of_uri = 0;
- int profile_tv = -1;
+ bool profile_tv = false;
MMPLAYER_FENTER();
@@ -6486,7 +6497,7 @@ __mmplayer_verify_gapless_play_path(mmplayer_t *player)
MM_PLAYER_GAPLESS_MODE, &gapless, NULL);
/* gapless playback is not supported in case of video at TV profile. */
- profile_tv = __mmplayer_check_profile();
+ profile_tv = __mmplayer_is_tv_profile();
if (profile_tv && video) {
LOGW("not support video gapless playback");
goto ERROR;