From: Jeongmo Yang Date: Tue, 11 Apr 2023 00:07:17 +0000 (+0900) Subject: [0.3.156] Free codec_data from media_packet_get_codec_data() X-Git-Tag: accepted/tizen/unified/20230413.123732^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F48%2F291148%2F1;p=platform%2Fcore%2Fapi%2Fplayer.git [0.3.156] Free codec_data from media_packet_get_codec_data() - The bug from media_packet_get_codec_data() has been fixed. : https://review.tizen.org/gerrit/#/c/platform/core/api/mediatool/+/291013/ Change-Id: Ifbc5b8a0cf249ac51208e228992237eaa33dc6cb Signed-off-by: Jeongmo Yang --- diff --git a/packaging/capi-media-player.spec b/packaging/capi-media-player.spec index d3b0a1e..eb14a62 100644 --- a/packaging/capi-media-player.spec +++ b/packaging/capi-media-player.spec @@ -1,6 +1,6 @@ Name: capi-media-player Summary: A Media Player API -Version: 0.3.155 +Version: 0.3.156 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/player.c b/src/player.c index 1e3968f..0e55b5d 100644 --- a/src/player.c +++ b/src/player.c @@ -4412,6 +4412,9 @@ int player_push_media_stream(player_h player, media_packet_h packet) if (media_packet_get_codec_data(packet, (void **)&codec_data, &codec_data_size) == MEDIA_PACKET_ERROR_NONE) { if (codec_data_size > 0 && codec_data_size <= sizeof(push_media.codec_data)) memcpy(push_media.codec_data, codec_data, codec_data_size); + + free(codec_data); + codec_data = NULL; } push_media.codec_data_size = codec_data_size;