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);