ffmpeg - [FFmpeg]什么是已弃用的 avpicture_alloc、avpicture::data 的替代品

标签 ffmpeg

我正在从 FFmpeg 站点修改示例源代码(muxing.c)。
我将旧功能更改为新功能并尝试构建代码。
然后,有几个错误说 AVPicture 被宣布弃用。

我在互联网上进行了一些研究,但找不到解决方法的答案。

/* Allocate the encoded raw picture. */
ret = avpicture_alloc(&dst_picture, c->pix_fmt, c->width, c->height);
if (ret < 0)
{
    //fprintf(stderr, "Could not allocate picture: %s\n", av_err2str(ret));
    char buf[256];
    av_strerror(ret, buf, sizeof(buf));
    printf("Could not allocate picture: %s,ret:%d\n", buf, ret);
    exit(1);
}

最佳答案

我认为是 av_image_alloc()

我也找不到替换是什么,我在 AVPicture 的来源中找到了那avpicture_alloc只需调用该函数。

关于ffmpeg - [FFmpeg]什么是已弃用的 avpicture_alloc、avpicture::data 的替代品,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36563818/

相关文章:

c# - 在录制视频ffmpeg中增加fps

ffmpeg 从具有多个 channel 的输入中输出单独的 channel

iphone - 从 Iphone Core Surface RGB 帧转换为 ffmpeg AVFrame

java - 添加不同宽度、高度的视频文件

video - 连接视频音频/视频不同步 : Non-monotonous TDS output

python - 是否可以在不先写入文件的情况下组合来自 ffmpeg-python 的音频和视频?

video - 即时更改 ffmpeg 输入

python-3.x - 如何将 ffmpeg 命令转换为 Python 代码

linux - 使用 ffmpeg 从运行 linux 的 Pocketbeagle 通过 UDP 直播网络摄像头视频,缺少什么?

nginx - nginx添加新模块时,配置组装出错