avformat_open_input函数崩溃
avformat_open_input function crashing
我试图使用avformat_open_input
打开一个文件,即使该文件存在,它也会崩溃。
av_register_all();
AVFormatContext *avFormatContext;
if (avformat_open_input(&avFormatContext, argv[1], NULL, NULL) < 0)
{
av_log(0, AV_LOG_FATAL, "Wasn't possible opening the file: %s", argv[1]);
return -1;
}
必须先将avFormatContext变量设为NULL:
av_register_all();
AVFormatContext *avFormatContext = NULL;
if (avformat_open_input(&avFormatContext, argv[1], NULL, NULL) < 0)
{
av_log(0, AV_LOG_FATAL, "Wasn't possible opening the file: %s", argv[1]);
return -1;
}
相关文章:
- 内联映射初始化的动态atexit析构函数崩溃
- 执行函数时导致崩溃的变量
- C 回调函数在对象 pascal 上崩溃
- 除非使用某些寄存器,否则函数挂钩会崩溃
- Linux c++.在预加载的共享库中定义的基类的崩溃调用函数
- Rcpp 函数在打包时使 RStudio 崩溃
- 使用 MS 绕道挂钩在调用钩子函数时崩溃C++
- 矢量迭代器在尝试调用函数时使我的程序崩溃
- 使用唯一指针调用函数会使我的程序崩溃
- 钩/绕道 d3d9 (现在/结束场景) - 似乎调用我的函数然后崩溃
- 程序在为链表创建推送函数时崩溃
- 递归导致程序崩溃,但 while 循环中的相同概念不是来自C++析构函数
- 从 C# 模块调用C++函数引发随机崩溃
- C++设置器函数崩溃
- EGL 在第一次 opengl 函数调用时崩溃
- 我需要做一个空函数循环回来,而不会让它崩溃或跳过
- 当我使用 ALSA lib 的函数"snd_pcm_readi"时它崩溃了
- 在C++中删除指针数组时析构函数崩溃
- 使用向量的函数崩溃,调试器说访问冲突读取位置
- 我的单例中的数组在离开函数后没有保留信息,然后在尝试再次访问信息时崩溃