1,451
社区成员
发帖
与我相关
我的任务
分享
av_register_all();
avformat_network_init();
AVFormatContext *pFormatCtx = avformat_alloc_context();
AVDictionary* options = nullptr;
int nRet = av_dict_set(&options, "bufsize", "655360", 0);
AVDictionaryEntry *t = NULL;
t = av_dict_get(options, "bufsize", NULL, AV_DICT_IGNORE_SUFFIX);
int nCount = av_dict_count(options);
if ((nRet = avformat_open_input(&pFormatCtx, "rtsp://192.168.99.51/1", NULL, &options)) != 0)
{
printf("打开输入流失败\n");
return;
}
nCount = av_dict_count(options);
if ((nRet = avformat_find_stream_info(pFormatCtx, &options)) < 0)
{
printf("查询流信息失败\n");
return;
}