diff options
author | Eunhae Choi <eunhae1.choi@samsung.com> | 2016-11-28 18:50:23 +0900 |
---|---|---|
committer | Eunhae Choi <eunhae1.choi@samsung.com> | 2016-11-28 18:51:47 +0900 |
commit | 2e36312756153a673f212503626521fc91c1ed30 (patch) | |
tree | 45d7b43a8b2b8a7252660d6cbead0b9ef8d01a1c | |
parent | 660e2936ec2ded6b130fe8b720453a886fc1a064 (diff) | |
parent | 99ce9ef7c3709142a72e51b5463965761fbbf7ee (diff) | |
download | libmm-player-2e36312756153a673f212503626521fc91c1ed30.tar.gz libmm-player-2e36312756153a673f212503626521fc91c1ed30.tar.bz2 libmm-player-2e36312756153a673f212503626521fc91c1ed30.zip |
Merge branch 'tizen_3.0' into tizensubmit/tizen/20161129.052917accepted/tizen/wearable/20161130.015350accepted/tizen/tv/20161130.015303accepted/tizen/mobile/20161130.015218accepted/tizen/ivi/20161130.015437accepted/tizen/common/20161129.173631
Change-Id: Id9364a3c7c14d574e2bf910146f646509efdacf1
Signed-off-by: Eunhae Choi <eunhae1.choi@samsung.com>
-rw-r--r-- | src/mm_player_capture.c | 20 | ||||
-rw-r--r-- | src/mm_player_priv.c | 8 |
2 files changed, 17 insertions, 11 deletions
diff --git a/src/mm_player_capture.c b/src/mm_player_capture.c index af6f117..514ab7a 100644 --- a/src/mm_player_capture.c +++ b/src/mm_player_capture.c @@ -279,6 +279,7 @@ __mmplayer_capture_thread(gpointer data) { mm_player_t* player = (mm_player_t*) data; MMMessageParamType msg = {0, }; + unsigned char * src_buffer = NULL; unsigned char * linear_y_plane = NULL; unsigned char * linear_uv_plane = NULL; int orientation = 0; @@ -307,7 +308,6 @@ __mmplayer_capture_thread(gpointer data) int linear_uv_plane_size; int width = player->captured.width[0]; int height = player->captured.height[0]; - unsigned char * src_buffer = NULL; linear_y_plane_size = (width * height); linear_uv_plane_size = (width * height / 2); @@ -357,22 +357,21 @@ __mmplayer_capture_thread(gpointer data) } else if (MM_PLAYER_COLORSPACE_NV12 == player->video_cs) { #define MM_ALIGN(x, a) (((x) +(a) - 1) & ~((a) - 1)) int ret = 0; - char *src_buffer = NULL; /* using original width otherwises, app can't know aligned to resize */ int width_align = player->captured.width[0]; int y_size = width_align * player->captured.height[0]; int uv_size = width_align * player->captured.height[1]; int src_buffer_size = y_size + uv_size; int i, j; - char*temp = NULL; - char*dst_buf = NULL; + unsigned char * temp = NULL; + unsigned char * dst_buf = NULL; if (!src_buffer_size) { LOGE("invalid data size"); goto ERROR; } - src_buffer = (char*) g_try_malloc(src_buffer_size); + src_buffer = (unsigned char*) g_try_malloc(src_buffer_size); if (!src_buffer) { msg.code = MM_ERROR_PLAYER_NO_FREE_SPACE; @@ -411,6 +410,9 @@ __mmplayer_capture_thread(gpointer data) LOGE("failed to convert nv12 linear"); goto ERROR; } + + /* clean */ + MMPLAYER_FREEIF(src_buffer); } ret = _mmplayer_get_video_rotate_angle((MMHandleType)player, &orientation); @@ -442,15 +444,13 @@ __mmplayer_capture_thread(gpointer data) //MMPLAYER_FREEIF(player->capture.data); continue; ERROR: + MMPLAYER_FREEIF(src_buffer); + MMPLAYER_FREEIF(player->captured.data[0]); + MMPLAYER_FREEIF(player->captured.data[1]); if (player->video_cs == MM_PLAYER_COLORSPACE_NV12_TILED) { /* clean */ MMPLAYER_FREEIF(linear_y_plane); MMPLAYER_FREEIF(linear_uv_plane); - MMPLAYER_FREEIF(player->captured.data[0]); - MMPLAYER_FREEIF(player->captured.data[1]); - } else if (MM_PLAYER_COLORSPACE_NV12 == player->video_cs) { - MMPLAYER_FREEIF(player->captured.data[0]); - MMPLAYER_FREEIF(player->captured.data[1]); } msg.union_type = MM_MSG_UNION_CODE; diff --git a/src/mm_player_priv.c b/src/mm_player_priv.c index 77c00f2..0b1d31e 100644 --- a/src/mm_player_priv.c +++ b/src/mm_player_priv.c @@ -5724,6 +5724,12 @@ __mmplayer_update_subtitle(GstElement* object, GstBuffer *buffer, GstPad *pad, g MMPLAYER_RETURN_VAL_IF_FAIL(player, FALSE); MMPLAYER_RETURN_VAL_IF_FAIL(buffer, FALSE); + if (player->is_subtitle_force_drop) + { + LOGW("subtitle is dropped forcedly."); + return ret; + } + gst_buffer_map(buffer, &mapinfo, GST_MAP_READ); text = mapinfo.data; text_size = mapinfo.size; @@ -9173,7 +9179,7 @@ _mmplayer_set_mute(MMHandleType hplayer, int mute) // @ return MM_ERROR_NONE; } - vol_element = player->pipeline->audiobin[MMPLAYER_A_SINK].gst; + vol_element = player->pipeline->audiobin[MMPLAYER_A_VOL].gst; /* NOTE : volume will only created when the bt is enabled */ if (vol_element) { |