From 3d7f54b44e51596c7fffb9244e9d6350103bc198 Mon Sep 17 00:00:00 2001 From: Kitae Kim Date: Fri, 13 Sep 2013 19:08:09 +0900 Subject: [PATCH] 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 --- tizen/src/hw/maru_brill_codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)); } } -- 2.7.4