summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2020-04-29 12:29:52 -0600
committerJohn Stebbins <[email protected]>2020-04-29 12:32:16 -0600
commitbcf0c6618f509dcf1346ad48e9e74f19aa2c9cd7 (patch)
tree770db5149315c808ed7e44dc86cfa5c1dbbee457
parent91051b41df7f9e6da68d14c9e806968df61ef050 (diff)
detelecine: fix initialization when params are empty
Fixes https://github.com/HandBrake/HandBrake/issues/2804
-rw-r--r--libhb/detelecine.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libhb/detelecine.c b/libhb/detelecine.c
index e7113996c..cbbab3a05 100644
--- a/libhb/detelecine.c
+++ b/libhb/detelecine.c
@@ -832,15 +832,15 @@ static int hb_detelecine_init( hb_filter_object_t * filter,
pv->input = *init;
pv->pullup_ctx = ctx = pullup_alloc_context();
- ctx->junk_left = ctx->junk_right = 1;
- ctx->junk_top = ctx->junk_bottom = 4;
+ // "Skip" array [top, bottom, left, right]
+ int top, bottom, left, right;
+
+ left = right = ctx->junk_left = ctx->junk_right = 1;
+ top = bottom = ctx->junk_top = ctx->junk_bottom = 4;
ctx->strict_breaks = -1;
ctx->metric_plane = 0;
ctx->parity = -1;
- // "Skip" array [top, bottom, left, right]
- int top, bottom, left, right;
-
hb_dict_extract_int(&top, filter->settings, "skip-top");
hb_dict_extract_int(&bottom, filter->settings, "skip-bottom");
hb_dict_extract_int(&left, filter->settings, "skip-left");