Use avcodec_encode_video2 instead of avcodec_encode_video

avcodec_encode_video2 was removed in Libav 10.