我正在尝试从来自 mp4 容器的压缩数据中解码数据包。我已经获得了 AVCodecContext,并从 avreadframe() 获得了数据包。问题是当我尝试解码数据包时,eclipse 一直说无法解析 avcodec_send_packet()。
我已经包括:
#include<libavformat/avformat.h>
#include<libavcodec/avcodec.h>
该程序也是用 C++ 编写的,所以我将 include 包含在 extern "C"中。 我在 ubuntu 16.04 上。我也查看了 avcodec.h 并没有找到 avcodec_send_packet() 的原型(prototype)。
此外,我还编辑了 g++ 命令以链接 -lavcodec -lavformat 。我不确定还有什么要检查的。 avcodec 中的其他功能起作用。只是不是这个。
最佳答案
作为 J.J. Hakala 指出,需要更新 libav 库。更新库后,只需刷新 eclipses 索引
关于c++ - Eclipse 不解析 avcodec_send_packet(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38408784/