FFMPEG error with avformat_open_input returning -135

独自空忆成欢 提交于 2019-12-03 20:34:25

The solution turned out to be that this particular camera didn't support RTSP over TCP transport. It wanted UDP.

I updated to code to try TCP and if that failed, to use an alternate set of options for UDP and another call to try an open things up.

if ((errCode = av_dict_set(&opts, "rtsp_transport", "udp", 0)) < 0)

Works like a charm. Still concerned about the origin of the -135 and -22 error codes which don't appear in the error.h file. Maybe an ffmpeg bug where a stray error code is allowed through.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!