diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-30 02:17:51 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-02-02 04:16:50 +0100 |
commit | fe3fed0b143ef6bf2d9b65ce05d55aba4224429e (patch) | |
tree | 45ead8f324a1e5190ea4905cb574325a3d9196bd /libavdevice | |
parent | 1dba8371d93cf1c83bcd5c432d921905206a60f3 (diff) | |
download | ffmpeg-streaming-fe3fed0b143ef6bf2d9b65ce05d55aba4224429e.zip ffmpeg-streaming-fe3fed0b143ef6bf2d9b65ce05d55aba4224429e.tar.gz |
Update demuxers and protocols for protocol whitelist support
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavdevice')
-rw-r--r-- | libavdevice/lavfi.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c index b7bc983..8e9e67d 100644 --- a/libavdevice/lavfi.c +++ b/libavdevice/lavfi.c @@ -40,6 +40,7 @@ #include "libavfilter/avfilter.h" #include "libavfilter/avfiltergraph.h" #include "libavfilter/buffersink.h" +#include "libavformat/avio_internal.h" #include "libavformat/internal.h" #include "avdevice.h" @@ -144,7 +145,11 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx) if (lavfi->graph_filename) { AVBPrint graph_file_pb; AVIOContext *avio = NULL; - ret = avio_open(&avio, lavfi->graph_filename, AVIO_FLAG_READ); + AVDictionary *options = NULL; + if (avctx->protocol_whitelist && (ret = av_dict_set(&options, "protocol_whitelist", avctx->protocol_whitelist, 0)) < 0) + goto end; + ret = avio_open2(&avio, lavfi->graph_filename, AVIO_FLAG_READ, &avctx->interrupt_callback, &options); + av_dict_set(&options, "protocol_whitelist", NULL, 0); if (ret < 0) goto end; av_bprint_init(&graph_file_pb, 0, AV_BPRINT_SIZE_UNLIMITED); |