Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
if (*p == ',')
(*nb_times)++;
- *times = av_malloc(sizeof(**times) * *nb_times);
+ *times = av_malloc_array(*nb_times, sizeof(**times));
if (!*times) {
av_log(log_ctx, AV_LOG_ERROR, "Could not allocate forced times array\n");
FAIL(AVERROR(ENOMEM));
if (*p == ',')
(*nb_frames)++;
- *frames = av_malloc(sizeof(**frames) * *nb_frames);
+ *frames = av_malloc_array(*nb_frames, sizeof(**frames));
if (!*frames) {
av_log(log_ctx, AV_LOG_ERROR, "Could not allocate forced frames array\n");
FAIL(AVERROR(ENOMEM));