Problem solved, sorry for the inconvenience, I hope it'll help others who have the same problem.
Solution :
* Forget about the warning.
* Go to the locations of the errors :
- Replace "codec.codec_type" by "codec->codec_type". Codec is a pointer.
- Replace "pCodecCtx=&pFormatCtx->..." by "pCodecCtx=pFormatCtx->..."
* Use function prototypes in the top of your code.
* Add this function :
int img_convert(AVPicture* dst, PixelFormat dst_pix_fmt, AVPicture* src, PixelFormat pix_fmt, int width, int height)
{
int av_log = av_log_get_level();
av_log_set_level(AV_LOG_QUIET);
SwsContext *img_convert_ctx = sws_getContext(width, height, pix_fmt, width, height, dst_pix_fmt, SWS_BICUBIC, NULL, NULL, NULL);
int result = sws_scale(img_convert_ctx, src->data, src->linesize, 0, height, dst->data, dst->linesize);
sws_freeContext(img_convert_ctx);
av_log_set_level(av_log);
return result;
}