bot1131357 bot1131357 - 10 months ago 330
C Question

FFmpeg: Protocol not on whitelist 'file'!

I want to read from an RTP stream, but when I specify "test.sdp" to

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

Normally if I were using ffplay on the console, I would add the option
-protocol_whitelist file,udp,rtp
and it would 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 still pops up. Any ideas?


This is awkward...

avformat_open_input failed because I have white spaces. Removing the whitespaces now work.

av_dict_set(&d, "protocol_whitelist", "file,udp,rtp", 0);