From: Ravi Kiran K N Date: Mon, 9 Jan 2017 06:37:52 +0000 (+0530) Subject: [TSAM-12471] Store and restore subtitle X-Git-Tag: submit/tizen/20170321.023915~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5eb526d205f742def6a599a677654267f4f6f2f7;p=profile%2Fmobile%2Fapps%2Fnative%2Fvideo-player.git [TSAM-12471] Store and restore subtitle When app pauses, store and restore subtitle so the playback continues along with the selected subtitle. Change-Id: I53a6115f1c66aa76f89db5b68cb2c15b0a1f593b Signed-off-by: Ravi Kiran K N --- diff --git a/playview/src/view/vp-play-normal-view.c b/playview/src/view/vp-play-normal-view.c index 603ee70..01af715 100644 --- a/playview/src/view/vp-play-normal-view.c +++ b/playview/src/view/vp-play-normal-view.c @@ -13880,7 +13880,9 @@ bool vp_play_normal_view_set_subtitle(normal_view_handle pViewHandle, VP_FREE(pNormalView->szSubtitleURL); - VP_STRDUP(pNormalView->szSubtitleURL, szSubtitle); + if (vp_file_exists(szSubtitle)) { + VP_STRDUP(pNormalView->szSubtitleURL, szSubtitle); + } return TRUE; } diff --git a/playview/src/vp-play-view.c b/playview/src/vp-play-view.c index 5bf0188..673b5ff 100644 --- a/playview/src/vp-play-view.c +++ b/playview/src/vp-play-view.c @@ -2072,6 +2072,7 @@ bool vp_play_view_unrealize(play_view_handle pViewHandle) } VP_FREE(pPlayView->szSubtitleURL); + vp_play_normal_view_get_subtitle(pPlayView->pNormalView, &pPlayView->szSubtitleURL); VideoLogInfo("vp_play_normal_view_unrealize START"); if (!pPlayView->bIsSharePopup) {