From: NAMJEONGYOON Date: Wed, 2 Nov 2016 06:34:44 +0000 (+0900) Subject: [v0.3.31] fix bug about setting subtitle_path to NULL X-Git-Tag: submit/tizen/20161108.054351~5^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c487edcf60268c739fb9323b22d3a98c952bcba5;p=platform%2Fcore%2Fapi%2Fplayer.git [v0.3.31] fix bug about setting subtitle_path to NULL Change-Id: I281691bf752ea3a4ffd9c37e38112d7956e6e4ef --- diff --git a/src/player.c b/src/player.c index b0e04fc..abb7128 100644 --- a/src/player.c +++ b/src/player.c @@ -3102,7 +3102,6 @@ int player_audio_effect_equalizer_is_available(player_h player, bool * pavailabl int player_set_subtitle_path(player_h player, const char *path) { PLAYER_INSTANCE_CHECK(player); - PLAYER_NULL_ARG_CHECK(path); int ret = PLAYER_ERROR_NONE; muse_player_api_e api = MUSE_PLAYER_API_SET_SUBTITLE_PATH; player_cli_s *pc = (player_cli_s *) player; @@ -3113,7 +3112,8 @@ int player_set_subtitle_path(player_h player, const char *path) if (storage_get_origin_internal_path(path, MAX_URL_LEN, subtitle_path) < 0) { /* cannot convert path. use the original one. */ - strncpy(subtitle_path, path, MAX_URL_LEN-1); + if (path != NULL) + strncpy(subtitle_path, path, MAX_URL_LEN-1); } else { /* need to use converted path. */ LOGD("Converted path : %s -> %s", path, subtitle_path);