Improve flash detection's behavior near the end of the video
Flash detection catches situations like AAAABBCCDDDD, where A,B,C,D are frames in different scenes. x264 would place a keyframe on the first "D". However, if the video ended on the last "C", x264 would place a keyframe on the first "C", even though C classifies as a flash. This change fixes this issue.
Showing with 8 additions and 7 deletions