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 <kt920.kim@samsung.com>
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);
} 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));
}
}