1. add atexit to clean memory alloc when program exiting,
2. add sigint_handler to handle SIGINT signal,
3. solve a memory leak at dmd_x264.c