ffmepg 指定RTSP网络连接模式UDP还是TCP
简介:
AVFormatContext *formatCtx = NULL;
formatCtx = avformat_alloc_context();
AVDictionary* options = NULL;
av_dict_set(&options, "rtsp_trans...
- AVFormatContext *formatCtx = NULL;
- formatCtx = avformat_alloc_context();
-
- AVDictionary* options = NULL;
- av_dict_set(&options, "rtsp_transport", "tcp", 0);
-
- avformat_open_input(&formatCtx, pszURLPath, NULL, &options) < 0);