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;
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);