ffmpeg 0.8 support
code cleanup
