[0.6.270] fix crash during gapless playback 67/272767/1 accepted/tizen/unified/20220325.133410 submit/tizen/20220324.062956
authorEunhye Choi <eunhae1.choi@samsung.com>
Thu, 24 Mar 2022 05:49:22 +0000 (14:49 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Thu, 24 Mar 2022 05:51:28 +0000 (14:51 +0900)
- uridecodebin includes all the elements
  except concat and sinkbin

Change-Id: Idbedaafb131ef99028e3095c33fef98572eeea2c

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

index 4a07c42..778e5a6 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-player
 Summary:    Multimedia Framework Player Library
-Version:    0.6.269
+Version:    0.6.270
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index ebb3f87..4d9df97 100644 (file)
@@ -177,7 +177,6 @@ typedef enum {
        /* streaming plugin */
        MMPLAYER_M_MUXED_S_BUFFER,
        MMPLAYER_M_DEMUXED_S_BUFFER,
-       MMPLAYER_M_ID3DEMUX,
        MMPLAYER_M_ADAPTIVE_DEMUX,
 
        /* es buff src queue */
index d9baff7..eb5ad2a 100644 (file)
@@ -744,11 +744,17 @@ __mmplayer_gapless_play_thread(gpointer data)
 
                mainbin = player->pipeline->mainbin;
 
-               MMPLAYER_RELEASE_ELEMENT(player, mainbin, MMPLAYER_M_MUXED_S_BUFFER);
-               MMPLAYER_RELEASE_ELEMENT(player, mainbin, MMPLAYER_M_ID3DEMUX);
-               MMPLAYER_RELEASE_ELEMENT(player, mainbin, MMPLAYER_M_AUTOPLUG);
-               MMPLAYER_RELEASE_ELEMENT(player, mainbin, MMPLAYER_M_TYPEFIND);
-               MMPLAYER_RELEASE_ELEMENT(player, mainbin, MMPLAYER_M_SRC);
+               if (MMPLAYER_USE_DECODEBIN(player)) {
+                       MMPLAYER_RELEASE_ELEMENT(player, mainbin, MMPLAYER_M_MUXED_S_BUFFER);
+                       MMPLAYER_RELEASE_ELEMENT(player, mainbin, MMPLAYER_M_AUTOPLUG); /* decodebin */
+                       MMPLAYER_RELEASE_ELEMENT(player, mainbin, MMPLAYER_M_TYPEFIND);
+                       MMPLAYER_RELEASE_ELEMENT(player, mainbin, MMPLAYER_M_SRC);
+               } else {
+                       MMPLAYER_RELEASE_ELEMENT(player, mainbin, MMPLAYER_M_AUTOPLUG); /* uridecodebin */
+                       mainbin[MMPLAYER_M_MUXED_S_BUFFER].gst = NULL;
+                       mainbin[MMPLAYER_M_TYPEFIND].gst = NULL;
+                       mainbin[MMPLAYER_M_SRC].gst = NULL;
+               }
 
                /* Initialize Player values */
                __mmplayer_initialize_gapless_play(player);