]> granicus.if.org Git - handbrake/commitdiff
comb_detect: fix crash when no valid frames are passed
authorJohn Stebbins <jstebbins.hb@gmail.com>
Mon, 11 Jun 2018 22:36:52 +0000 (15:36 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Mon, 11 Jun 2018 22:36:52 +0000 (15:36 -0700)
libhb/comb_detect.c

index 16eef9f21525b36db4be3ac4d1652a6bfe5db95b..014c0c0625b15dac37ef04b38fad21a920a2a40b 100644 (file)
@@ -1527,7 +1527,10 @@ static int comb_detect_work( hb_filter_object_t * filter,
     {
         // Duplicate last frame and process refs
         store_ref(pv, hb_buffer_dup(pv->ref[2]));
-        process_frame(pv);
+        if (pv->ref[0] != NULL)
+        {
+            process_frame(pv);
+        }
         hb_buffer_list_append(&pv->out_list, in);
         *buf_out = hb_buffer_list_clear(&pv->out_list);
         return HB_FILTER_DONE;