mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
avfilter/buffer: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e951e04a4a
commit
b9cce9ee5c
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue