- 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);
ffmepg 指定RTSP网络连接模式UDP还是TCP
原文:http://www.cnblogs.com/lidabo/p/4528345.html