I want to read from the RTP stream, but when I point "test.sdp" to avformat_open_input(), I get this message:
[rtp @ 03928900] Protocol not on whitelist 'file'!
Failed: cannot open input.
avformat_open_input() fail: Invalid data found when processing input
Usually, if I used ffplay on the console, I would add an option -protocol_whitelist file,udp,rtp, and it will work fine.
So, I tried this:
AVDictionary *d = NULL;
av_dict_set(&d, "protocol_whitelist", "file, udp, rtp", 0);
ret = avformat_open_input(&inFormatCtx, filename, NULL, &d);
But the same message pops up. Any ideas?
source
share