C++ avformat_alloc_上下文返回null

C++ avformat_alloc_上下文返回null,c++,ffmpeg,C++,Ffmpeg,我目前正在尝试通过FFMPEG播放流中的视频。然而,我目前被困在一个特定的部分:不管我做什么,avformat_alloc_context()似乎返回null 有人可能知道会发生什么吗 我一直在引用下面的链接: 1调用av\u register\u all()first.(初始化libavformat并注册所有muxer、demuxer和协议) 2检查代码,如avformat\u open\u input(&pFormatCtx,file\u name,NULL,NULL),是否返回非-0。如果

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

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

我一直在引用下面的链接:

1调用
av\u register\u all()
first.(初始化libavformat并注册所有muxer、demuxer和协议)

2检查代码,如
avformat\u open\u input(&pFormatCtx,file\u name,NULL,NULL)
,是否返回非-0。如果返回,则
pFormatCtx
返回nil