[FFmpeg] 播放RTSP的一些常用配置选项

AVDictionary* options = NULL;
av_dict_set(&options, "buffer_size", "1024000", 0);
av_dict_set(&options, "stimeout", "10000000", 0);  //设置超时断开连接时间

if(avformat_open_input(&pFormatCtx,url.c_str(),NULL,&options)!=0){
    printf("Couldn't open input stream.\n");
    return false;
}

猜你喜欢

转载自blog.csdn.net/u014671962/article/details/85111313
今日推荐