summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2015-12-10 02:19:03 (GMT)
committerMinkyu Kang <mk7.kang@samsung.com>2015-12-10 02:19:03 (GMT)
commitc60e81353cedbb0ea44b662e3855b6f900e16c40 (patch)
tree730a6b7fe06860b7f2dc67cc2be034bfa734d06a
parentad5bb8d28f5f05e2a0c1b41bcfc56013013f1e78 (diff)
downloadair_mediahub-c60e81353cedbb0ea44b662e3855b6f900e16c40.zip
air_mediahub-c60e81353cedbb0ea44b662e3855b6f900e16c40.tar.gz
air_mediahub-c60e81353cedbb0ea44b662e3855b6f900e16c40.tar.bz2
viewer: don't start the progressbar if failed to playrefs/changes/65/53865/1
Change-Id: I356c5dda3856dff8f3e8f80221a09d7fc01dcd62 Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
-rw-r--r--src/view/viewer.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/view/viewer.c b/src/view/viewer.c
index 20ab723..61cc384 100644
--- a/src/view/viewer.c
+++ b/src/view/viewer.c
@@ -824,6 +824,7 @@ static void _player_play_pause(struct _priv *priv)
{
app_media_info *mi;
player_state_e state;
+ bool r;
playermgr_get_state(priv->player, &state);
@@ -847,11 +848,12 @@ static void _player_play_pause(struct _priv *priv)
_remove_thumbnail(priv);
_update_to_player(priv);
- progressbar_start(priv->progress);
- playermgr_play(priv->player, mi->file_path,
+ r = playermgr_play(priv->player, mi->file_path,
mi->video->position);
-
- _update_info(priv, mi);
+ if (r) {
+ progressbar_start(priv->progress);
+ _update_info(priv, mi);
+ }
break;
default:
@@ -865,6 +867,7 @@ static void _player_play(struct _priv *priv)
app_media_info *mi;
player_state_e state;
struct controller *ctl;
+ bool r;
playermgr_get_state(priv->player, &state);
@@ -886,11 +889,12 @@ static void _player_play(struct _priv *priv)
_remove_thumbnail(priv);
_update_to_player(priv);
- progressbar_start(priv->progress);
- playermgr_play(priv->player, mi->file_path,
+ r = playermgr_play(priv->player, mi->file_path,
mi->video->position);
-
- _update_info(priv, mi);
+ if (r) {
+ progressbar_start(priv->progress);
+ _update_info(priv, mi);
+ }
break;
default: