I'm using ffmpeg to read an rtsp camera. I'm getting an error: ffmpeg rtsp error: Nonmatching transport in server reply" in c++ and "Invalid data found when processing input". The camera has setting "RTP ES". Here's the code.
source_name = "rtsp://192.168.1.108/WESCAM";
// Open the initial context variables that are needed
format_ctx = avformat_alloc_context();
codec_ctx = NULL;
// Register everything
av_register_all();
avformat_network_init();
//open RTSP camera or h264 file
if (avformat_open_input(&format_ctx, source_name, NULL, NULL) != 0)
{
return EXIT_FAILURE;
}