cvtColor(img,img,COLOR_BGR2RGB); uint8_t*dst_data[4]={NULL}; intdst_linesize[4]={0}; av_image_fill_arrays(dst_data,dst_linesize, frame->data[0],AV_PIX_FMT_RGB24, width,height,1); memcpy(dst_data[0],img.data,img.total()*img.elemSize()); // 进行像素格式转换 sws_scale(sw...