//图像数据缓存
static uint8_t *video_dst_data[4] = { NULL };//图像通道地址
static int video_dst_linesize[4];//通道内存对齐步长
//申请图像处理内存
1.ret = av_image_alloc(video_dst_data, video_dst_linesize, width, height, pix_fmt, 1);
2.计算按照格式需要的内存大小
2.1 size =av_image_get_buffer_size(AV_PIX_FMT_YUV420P, pCodecContext->width, pCodecContext->height, 1)
2.2 申请内存
uint8_t *out_buffer = (unsigned char *) av_malloc(size)
2.3 格式化内存大小
av_image_fill_arrays(pFrameYUV->data, pFrameYUV->linesize, out_buffer, AV_PIX_FMT_YUV420P, pCodecContext->width, pCodecContext->height, 1);
1.2 实现同样的效果