FFmpeg 错误 C4996: ‘avcodec_alloc_frame’: 被声明为已否决 解决方法

在 Visual Studio 2013 下编写 FFmpeg 程序时出错,错误如下:
ffmpeg-error-c4996-avcodec_alloc_frame-is-deprecated-solution-1

出错代码如下:
ffmpeg-error-c4996-avcodec_alloc_frame-is-deprecated-solution-2

解决方法为:
avcodec_alloc_frame() 替换为 av_frame_alloc()

refer:
avcodec_alloc_frame is deprecated · Issue #3 · nareix/codec · GitHub

暂无评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

验证码已失效,请刷新验证码