mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avfilter/buffer: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e951e04a4a
commit
b9cce9ee5c
@ -79,7 +79,7 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
|
||||
|
||||
if (ref->extended_data && ref->extended_data != ref->data) {
|
||||
int nb_channels = av_get_channel_layout_nb_channels(ref->audio->channel_layout);
|
||||
if (!(ret->extended_data = av_malloc(sizeof(*ret->extended_data) *
|
||||
if (!(ret->extended_data = av_malloc_array(sizeof(*ret->extended_data),
|
||||
nb_channels))) {
|
||||
av_freep(&ret->audio);
|
||||
av_freep(&ret);
|
||||
|
Loading…
x
Reference in New Issue
Block a user