Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com> --- libavfilter/formats.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/libavfilter/formats.c b/libavfilter/formats.c index c370f7f91c..4efbcbebfe 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -60,6 +60,7 @@ do { \ #define MERGE_FORMATS(a, b, fmts, nb, type, fail_statement) \ do { \ int i, j, k = 0; \ + void *tmp; \ \ for (i = 0; i < a->nb; i++) \ for (j = 0; j < b->nb; j++) \ @@ -72,6 +73,9 @@ do { if (!k) \ { fail_statement } \ a->nb = k; \ + tmp = av_realloc_array(a->fmts, a->nb, sizeof(*a->fmts)); \ + if (tmp) \ + a->fmts = tmp; \ \ MERGE_REF(a, b, fmts, type, fail_statement); \ } while (0) -- 2.20.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".