[TSAM-1061/TSAM-1062] Fixed crashes for next and previous button click twice 12/60612/3 accepted/tizen/mobile/20160302.003747 submit/tizen_mobile/20160229.122401
authorbhutani.92 <bhutani.92@samsung.com>
Mon, 29 Feb 2016 09:42:42 +0000 (15:12 +0530)
committerPrakashPedarla Samsung <prakashc.p@samsung.com>
Mon, 29 Feb 2016 09:37:14 +0000 (01:37 -0800)
Change-Id: I3fa6c760a06391576c39e29b1f0d53e395b4facd
Signed-off-by: bhutani.92 <bhutani.92@samsung.com>
src/core/mp-player-mgr.c
src/mp-main.c

index c66af45056961d41d0a7c966a9aa407c7b238f28..03534881caef195188d11099ab9b87677699d7f2 100755 (executable)
@@ -708,10 +708,6 @@ mp_player_mgr_destroy(void *data)
                mp_setting_set_player_state(MP_PLAY_STATE_NONE);
        }
 
-       error = sound_manager_destroy_stream_information(ad->stream_info);
-       if (error != SOUND_MANAGER_ERROR_NONE) {
-               DEBUG_TRACE("unable to destroy stream. error code [%x]", error);
-       }
        is_seeking = false;
        g_reserved_seek_pos = -1;
        g_reserved_cb = NULL;
index 3d5801f80e8c40f6c1ab4bd68ad6da1f1abc0b65..8b6de7b5fb45f6f001532aede607f1cd866851dc 100755 (executable)
@@ -1462,6 +1462,13 @@ mp_terminate(void *data)
 
        mp_volume_finalize();
 
+       if(ad->stream_info) {
+               int error = sound_manager_destroy_stream_information(ad->stream_info);
+               if (error != SOUND_MANAGER_ERROR_NONE) {
+                       ERROR_TRACE("unable to destroy stream. error code [%x]", error);
+               }
+       }
+
 #ifdef MP_SOUND_PLAYER
        mp_setting_set_nowplaying_id(0);
 #endif