fix a memory leak
add x264