From: Eunhae Choi Date: Thu, 16 Feb 2017 11:01:27 +0000 (+0900) Subject: [0.6.31] fix svace issue X-Git-Tag: accepted/tizen/common/20170303.090902~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=36eaf9996756b8ac04f2dd9bd227b01e13da32de;p=platform%2Fcore%2Fmultimedia%2Flibmm-player.git [0.6.31] fix svace issue Change-Id: Ibe7a4785b4d6b4ef287bc0e5811566720c9e15c3 --- diff --git a/packaging/libmm-player.spec b/packaging/libmm-player.spec index 07c9472..774741c 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.30 +Version: 0.6.31 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/mm_player_es.c b/src/mm_player_es.c index 6db1e11..bca7649 100644 --- a/src/mm_player_es.c +++ b/src/mm_player_es.c @@ -761,7 +761,7 @@ _mmplayer_set_audio_info(MMHandleType hplayer, media_format_h format) } #endif - if (audio.extradata_size) { + if (audio.extradata_size && audio.codec_extradata) { GstBuffer *buf = NULL; GstMapInfo buff_info = GST_MAP_INFO_INIT; @@ -774,6 +774,7 @@ _mmplayer_set_audio_info(MMHandleType hplayer, media_format_h format) gst_caps_set_simple(caps, "codec_data", GST_TYPE_BUFFER, buf, NULL); gst_buffer_unref(buf); + g_free((char *) audio.codec_extradata); } g_free((char *) audio.mime); diff --git a/src/mm_player_priv.c b/src/mm_player_priv.c index b41627d..25388ea 100644 --- a/src/mm_player_priv.c +++ b/src/mm_player_priv.c @@ -7564,7 +7564,7 @@ __gst_set_position(mm_player_t* player, int format, unsigned long position, gboo g_object_set(player->pipeline->mainbin[MMPLAYER_M_SRC].gst, "pending-start-position", pos_nsec, NULL); LOGD("[%s] set position =%"GST_TIME_FORMAT, - gst_element_get_name(player->pipeline->mainbin[MMPLAYER_M_SRC].gst), GST_TIME_ARGS(pos_nsec)); + GST_ELEMENT_NAME(player->pipeline->mainbin[MMPLAYER_M_SRC].gst), GST_TIME_ARGS(pos_nsec)); player->doing_seek = FALSE; MMPLAYER_POST_MSG(player, MM_MESSAGE_SEEK_COMPLETED, NULL); } else { @@ -14063,101 +14063,6 @@ int _mmplayer_set_subtitle_silent(MMHandleType hplayer, int silent) return MM_ERROR_NONE; } -int _mmplayer_remove_audio_parser_decoder(mm_player_t* player, GstPad *inpad) -{ - int result = MM_ERROR_NONE; - GstPad *peer = NULL, *pad = NULL; - GstElement *Element = NULL; - MMPlayerGstElement* mainbin = NULL; - mainbin = player->pipeline->mainbin; - - #if 0 - if (!gst_pad_set_blocked(inpad, TRUE)) { - result = MM_ERROR_PLAYER_INTERNAL; - goto EXIT; - } - #endif - gst_pad_add_probe(inpad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM, - NULL, NULL, NULL); - - /*Getting pad connected to demuxer audio pad */ - peer = gst_pad_get_peer(inpad); - /* Disconnecting Demuxer and its peer plugin [audio] */ - if (peer) { - if (!gst_pad_unlink(inpad, peer)) { - result = MM_ERROR_PLAYER_INTERNAL; - goto EXIT; - } - } else { - result = MM_ERROR_PLAYER_INTERNAL; - goto EXIT; - } - /*Removing elements between Demuxer and audiobin*/ - while (peer != NULL) { - gchar *Element_name = NULL; - gchar *factory_name = NULL; - GList *elements = NULL; - GstElementFactory *factory = NULL; - /*Getting peer element*/ - Element = gst_pad_get_parent_element(peer); - if (Element == NULL) { - gst_object_unref(peer); - result = MM_ERROR_PLAYER_INTERNAL; - break; - } - - Element_name = gst_element_get_name(Element); - factory = gst_element_get_factory(Element); - /*checking the element is audio bin*/ - if (!strcmp(Element_name, "audiobin")) { - gst_object_unref(peer); - result = MM_ERROR_NONE; - g_free(Element_name); - break; - } - factory_name = GST_OBJECT_NAME(factory); - pad = gst_element_get_static_pad(Element, "src"); - if (pad == NULL) { - result = MM_ERROR_PLAYER_INTERNAL; - g_free(Element_name); - break; - } - gst_object_unref(peer); - peer = gst_pad_get_peer(pad); - if (peer) { - if (!gst_pad_unlink(pad, peer)) { - gst_object_unref(peer); - gst_object_unref(pad); - result = MM_ERROR_PLAYER_INTERNAL; - g_free(Element_name); - break; - } - } - elements = player->parsers; - /* Removing the element form the list*/ - for (; elements; elements = g_list_next(elements)) { - Element_name = elements->data; - if (g_strrstr(Element_name, factory_name)) - player->parsers = g_list_remove(player->parsers, elements->data); - } - gst_element_set_state(Element, GST_STATE_NULL); - gst_bin_remove(GST_BIN(mainbin[MMPLAYER_M_PIPE].gst), Element); - gst_object_unref(pad); - if (Element == mainbin[MMPLAYER_M_Q1].gst) - mainbin[MMPLAYER_M_Q1].gst = NULL; - else if (Element == mainbin[MMPLAYER_M_Q2].gst) - mainbin[MMPLAYER_M_Q2].gst = NULL; - else if (Element == mainbin[MMPLAYER_M_DEC1].gst) - mainbin[MMPLAYER_M_DEC1].gst = NULL; - else if (Element == mainbin[MMPLAYER_M_DEC2].gst) - mainbin[MMPLAYER_M_DEC2].gst = NULL; - - gst_object_unref(Element); - } -EXIT: - return result; -} - int _mmplayer_sync_subtitle_pipeline(mm_player_t* player) { MMPlayerGstElement* mainbin = NULL;