summaryrefslogtreecommitdiffstats
path: root/libhb/pad.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2021-04-05 16:14:16 -0600
committerJohn Stebbins <[email protected]>2021-04-12 15:11:56 -0600
commitb0761f7aef500a3d45178343d1144aae870da4d0 (patch)
tree64c349854ae64812c8bde5881f4f87b4b22ba2ed /libhb/pad.c
parent9b500c8de0807b6bece0208b799a5facc242c434 (diff)
pad: prevent invalid settings reaching avfilter
avfilter does not gracefully handle invalid pad width or height
Diffstat (limited to 'libhb/pad.c')
-rw-r--r--libhb/pad.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libhb/pad.c b/libhb/pad.c
index eee3e1c79..9c0be9d11 100644
--- a/libhb/pad.c
+++ b/libhb/pad.c
@@ -90,14 +90,15 @@ static int pad_init(hb_filter_object_t * filter, hb_filter_init_t * init)
{
snprintf(y_str, 20, "%d", y);
}
- if (width < 0)
+ if (width < init->geometry.width)
{
width = init->geometry.width;
}
- if (height < 0)
+ if (height < init->geometry.height)
{
height = init->geometry.height;
}
+
hb_dict_t * avfilter = hb_dict_init();
hb_dict_t * avsettings = hb_dict_init();