[0.6.269] fix crash during gapless playback 70/272770/2 accepted/tizen/6.5/unified/20220325.133450 submit/tizen_6.5/20220324.075935
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 06:32:49 +0000 (15:32 +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 60683a4..4a07c42 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-player
 Summary:    Multimedia Framework Player Library
-Version:    0.6.268
+Version:    0.6.269
 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 fe0d105..7efd88f 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);