avcodec/h264_refs: modify key frame detection heuristic to detect more cases