[0.6.271] set the textbin clock to the referenced pipeline clock 51/280151/4 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/hotfix/20221116.105424 accepted/tizen/unified/20220826.161539 submit/tizen/20220825.043817 tizen_7.0_m2_release
authorEunhye Choi <eunhae1.choi@samsung.com>
Wed, 24 Aug 2022 10:02:09 +0000 (19:02 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Thu, 25 Aug 2022 04:06:26 +0000 (13:06 +0900)
- fix crash issue
- pipeline clock is released when the subtitle pipeline
state is sync to main pipeline during playing
which cause crash when the main pipeline is unreferenced.

Change-Id: Id71adee2288b41bb5ce5202a7f05a41917aa9374

packaging/libmm-player.spec
src/mm_player_priv.c

index 778e5a6..5a1b4e2 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-player
 Summary:    Multimedia Framework Player Library
-Version:    0.6.270
+Version:    0.6.271
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index eb5ad2a..bcf15b5 100644 (file)
@@ -8252,7 +8252,7 @@ _mmplayer_sync_subtitle_pipeline(mmplayer_t *player)
        current_state = GST_STATE(mainbin[MMPLAYER_M_PIPE].gst);
 
        // sync clock with current pipeline
-       curr_clock = GST_ELEMENT_CLOCK(player->pipeline->mainbin[MMPLAYER_M_PIPE].gst);
+       curr_clock = gst_element_get_clock(player->pipeline->mainbin[MMPLAYER_M_PIPE].gst);
        curr_time = gst_clock_get_time(curr_clock);
 
        base_time = gst_element_get_base_time(GST_ELEMENT_CAST(player->pipeline->mainbin[MMPLAYER_M_PIPE].gst));
@@ -8271,6 +8271,8 @@ _mmplayer_sync_subtitle_pipeline(mmplayer_t *player)
                if (GST_STATE_CHANGE_FAILURE == ret) {
                        LOGE("fail to state change.");
                        result = MM_ERROR_PLAYER_INTERNAL;
+                       if (curr_clock)
+                               gst_object_unref(curr_clock);
                        goto ERROR;
                }
        }