From 6f697a1dac09947281a057e387ca2a5eb4e63a20 Mon Sep 17 00:00:00 2001 From: Eunhye Choi Date: Thu, 24 Mar 2022 14:49:22 +0900 Subject: [PATCH] [0.6.270] fix crash during gapless playback - uridecodebin includes all the elements except concat and sinkbin Change-Id: Idbedaafb131ef99028e3095c33fef98572eeea2c --- packaging/libmm-player.spec | 2 +- src/include/mm_player_priv.h | 1 - src/mm_player_priv.c | 16 +++++++++++----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/packaging/libmm-player.spec b/packaging/libmm-player.spec index 4a07c42..778e5a6 100644 --- a/packaging/libmm-player.spec +++ b/packaging/libmm-player.spec @@ -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 diff --git a/src/include/mm_player_priv.h b/src/include/mm_player_priv.h index ebb3f87..4d9df97 100644 --- a/src/include/mm_player_priv.h +++ b/src/include/mm_player_priv.h @@ -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 */ diff --git a/src/mm_player_priv.c b/src/mm_player_priv.c index d9baff7..eb5ad2a 100644 --- a/src/mm_player_priv.c +++ b/src/mm_player_priv.c @@ -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); -- 2.7.4