mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 07:08:23 +00:00
avaudenc: Use av_malloc() instead of GLib malloc() wrappers for memory freed by ffmpeg
It has its own allocator that is not necessarily doing the same as malloc and will then usually crash. E.g. on Windows or when memalign() is available.
This commit is contained in:
parent
da335a0ea3
commit
a7d9d448bd
1 changed files with 2 additions and 2 deletions
|
@ -488,12 +488,12 @@ gst_ffmpegaudenc_encode_audio (GstFFMpegAudEnc * ffmpegaudenc,
|
|||
|
||||
if (info->channels > AV_NUM_DATA_POINTERS) {
|
||||
buffer_info->ext_data_array = frame->extended_data =
|
||||
g_new (uint8_t *, info->channels);
|
||||
av_malloc_array (info->channels, sizeof (uint8_t *));
|
||||
} else {
|
||||
frame->extended_data = frame->data;
|
||||
}
|
||||
|
||||
buffer_info->ext_data = frame->extended_data[0] = g_malloc (in_size);
|
||||
buffer_info->ext_data = frame->extended_data[0] = av_malloc (in_size);
|
||||
frame->linesize[0] = in_size / channels;
|
||||
for (i = 1; i < channels; i++)
|
||||
frame->extended_data[i] =
|
||||
|
|
Loading…
Reference in a new issue