avformat_open_input 返回失败 -22
AVDictionary *avdic = NULL;
av_dict_set(&avdic, "timeout", "6000", 0);//设置超时3秒 都不行。
av_register_all();
avcodec_register_all();
avformat_network_init();
AVDictionary *avdic = NULL;
av_dict_set(&avdic, "timeout", "6000", 0);//设置超时3秒
char url[] = "http://xxxxxxx";
AVFormatContext* pFormatCtx = NULL;
pFormatCtx = avformat_alloc_context();
int err = avformat_open_input(&pFormatCtx, url, NULL, &avdic);
if (err != 0)
{
return -1;
}
打开的是 url
一直返回-22 不知道为什么原因,换一台电脑就没问题了
看了http://bbs.csdn.net/topics/390040155这个帖子
把第一个参数设置null 也不行,
把最后一个参数设置null也不行。