Showing the changes to libavfilter/avcodec.c (1 of 1 file). Show all
Unified · Split
| @@ -116,7 +116,7 @@ int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src) · 115 unmodified lines | ||
| 116 | 116 | planes = av_sample_fmt_is_planar(src->format) ? nb_channels : 1; |
| 117 | 117 | |
| 118 | 118 | if (planes > FF_ARRAY_ELEMS(dst->data)) { |
| 119 | − dst->extended_data = av_mallocz(planes * sizeof(*dst->extended_data)); | |
| 119 | + dst->extended_data = av_mallocz_array(planes, sizeof(*dst->extended_data)); | |
| 120 | 120 | if (!dst->extended_data) |
| 121 | 121 | return AVERROR(ENOMEM); |
| 122 | 122 | memcpy(dst->extended_data, src->extended_data, |