From: Kitae Kim Date: Fri, 13 Sep 2013 10:08:09 +0000 (+0900) Subject: brillcodec: changed memory allocation function. X-Git-Tag: TizenStudio_2.0_p2.3~607^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d7f54b44e51596c7fffb9244e9d6350103bc198;p=sdk%2Femulator%2Fqemu.git brillcodec: changed memory allocation function. Allocate memory with g_malloc and then deallocate it with av_free for FFmpeg. The above case causes segv problem on Windows. Change-Id: I163fbd07228b40a6bfc2edd66a9aafe3abb9d4c4 Signed-off-by: Kitae Kim --- diff --git a/tizen/src/hw/maru_brill_codec.c b/tizen/src/hw/maru_brill_codec.c index ecbc659..4c22e5b 100644 --- a/tizen/src/hw/maru_brill_codec.c +++ b/tizen/src/hw/maru_brill_codec.c @@ -990,7 +990,7 @@ static void read_codec_init_data(AVCodecContext *avctx, uint8_t *mem_buf) if (avctx->extradata_size > 0) { TRACE("extradata size: %d.\n", avctx->extradata_size); avctx->extradata = - g_malloc0(ROUND_UP_X(avctx->extradata_size + + av_mallocz(ROUND_UP_X(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE, 4)); if (avctx->extradata) { memcpy(avctx->extradata, mem_buf + size, avctx->extradata_size); @@ -998,7 +998,7 @@ static void read_codec_init_data(AVCodecContext *avctx, uint8_t *mem_buf) } else { TRACE("no extra data.\n"); avctx->extradata = - g_malloc0(ROUND_UP_X(FF_INPUT_BUFFER_PADDING_SIZE, 4)); + av_mallocz(ROUND_UP_X(FF_INPUT_BUFFER_PADDING_SIZE, 4)); } }