avformat_alloc_context returns null

avformat_alloc_context returns null

本文关键字:null returns alloc avformat context      更新时间:2023-10-16

我目前正在尝试通过FFMPEG播放流中的视频。然而,我目前被困在一个特定的部分:无论我做什么,avformat_alloc_context();似乎都返回null。

有人可能知道会发生什么吗?

我一直在引用下面的链接:使用libavformat 读取内存中的文件

1调用av_register_all() fistart。(初始化libavformat并注册所有复用器、解复用器和协议(

2检查像avformat_open_input(&pFormatCtx, file_name, NULL, NULL)这样的代码,是否返回not-如果是,pFormatCtx返回nil;