modify code in order to upward compatible with ffmpeg-2.0.2