Need to pass padding to "av_frame_get_buffer".
Don't declare the AVCodec as static.