From 6db2c461472bd3d54d5133541928adbd046f48ac Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Fri, 18 May 2018 10:11:03 -0700 Subject: [PATCH] libav: fix vf_pad segfault --- contrib/ffmpeg/A22-vf_pad-segfault.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 contrib/ffmpeg/A22-vf_pad-segfault.patch diff --git a/contrib/ffmpeg/A22-vf_pad-segfault.patch b/contrib/ffmpeg/A22-vf_pad-segfault.patch new file mode 100644 index 000000000..69c10709a --- /dev/null +++ b/contrib/ffmpeg/A22-vf_pad-segfault.patch @@ -0,0 +1,12 @@ +diff -aur libav-12.3.orig/libavfilter/vf_pad.c libav-12.3/libavfilter/vf_pad.c +--- libav-12.3.orig/libavfilter/vf_pad.c 2018-02-12 13:25:59.000000000 -0800 ++++ libav-12.3/libavfilter/vf_pad.c 2018-05-18 10:00:21.636907569 -0700 +@@ -300,7 +300,7 @@ + (s->y >> vsub) * frame->linesize[planes[i]]; + ptrdiff_t req_end = ((s->w - s->x - frame->width) >> hsub) * + s->line_step[planes[i]] + +- (s->y >> vsub) * frame->linesize[planes[i]]; ++ ((s->h - s->y - frame->height) >> vsub) * frame->linesize[planes[i]]; + + if (frame->linesize[planes[i]] < (s->w >> hsub) * s->line_step[planes[i]]) + return 1; -- 2.40.0