]> granicus.if.org Git - handbrake/commitdiff
vfr: fix invalid read/write
authorJohn Stebbins <jstebbins.hb@gmail.com>
Sun, 26 Feb 2017 19:42:01 +0000 (12:42 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Sun, 26 Feb 2017 19:42:01 +0000 (12:42 -0700)
Probably the cause of crash seen in nightly builds

fixes https://github.com/HandBrake/HandBrake/issues/597

libhb/vfr.c

index 81ab4183e3763d181c8acc99d8d5fb6902bd9732..9f0e48263b68e3b0be8c87815ec4428c830cf507 100644 (file)
@@ -349,9 +349,8 @@ static int hb_vfr_init(hb_filter_object_t *filter, hb_filter_init_t *init)
     hb_dict_extract_int(&pv->cfr, filter->settings, "mode");
     hb_dict_extract_rational(&pv->vrate, filter->settings, "rate");
 
-    // By default, we need at least 4 delay frames in order to smooth
-    // timestamp values
-    pv->frame_analysis_depth = 1;
+    // frame-drop analysis always looks at at least 2 buffers
+    pv->frame_analysis_depth = 2;
 
     // Calculate the number of frames we need to keep in order to
     // detect "best" candidate frames to drop.