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 /libavformat/hdsenc.c | |
parent | 1dba8371d93cf1c83bcd5c432d921905206a60f3 (diff) |
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 'libavformat/hdsenc.c')
-rw-r--r-- | libavformat/hdsenc.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c index 76701859c1..93fa27f8b5 100644 --- a/libavformat/hdsenc.c +++ b/libavformat/hdsenc.c @@ -26,6 +26,7 @@ #endif #include "avformat.h" +#include "avio_internal.h" #include "internal.h" #include "os_support.h" @@ -169,8 +170,8 @@ static int write_manifest(AVFormatContext *s, int final) snprintf(filename, sizeof(filename), "%s/index.f4m", s->filename); snprintf(temp_filename, sizeof(temp_filename), "%s/index.f4m.tmp", s->filename); - ret = avio_open2(&out, temp_filename, AVIO_FLAG_WRITE, - &s->interrupt_callback, NULL); + ret = ffio_open_whitelist(&out, temp_filename, AVIO_FLAG_WRITE, + &s->interrupt_callback, NULL, s->protocol_whitelist); if (ret < 0) { av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", temp_filename); return ret; @@ -238,8 +239,8 @@ static int write_abst(AVFormatContext *s, OutputStream *os, int final) "%s/stream%d.abst", s->filename, index); snprintf(temp_filename, sizeof(temp_filename), "%s/stream%d.abst.tmp", s->filename, index); - ret = avio_open2(&out, temp_filename, AVIO_FLAG_WRITE, - &s->interrupt_callback, NULL); + ret = ffio_open_whitelist(&out, temp_filename, AVIO_FLAG_WRITE, + &s->interrupt_callback, NULL, s->protocol_whitelist); if (ret < 0) { av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", temp_filename); return ret; @@ -289,8 +290,8 @@ static int write_abst(AVFormatContext *s, OutputStream *os, int final) static int init_file(AVFormatContext *s, OutputStream *os, int64_t start_ts) { int ret, i; - ret = avio_open2(&os->out, os->temp_filename, AVIO_FLAG_WRITE, - &s->interrupt_callback, NULL); + ret = ffio_open_whitelist(&os->out, os->temp_filename, AVIO_FLAG_WRITE, + &s->interrupt_callback, NULL, s->protocol_whitelist); if (ret < 0) return ret; avio_wb32(os->out, 0); |