diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-02-10 14:40:32 +0000 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-02-10 14:42:41 +0000 |
commit | bc9a5965c815cf7fd998d8ce14a18b8e861dd9ce (patch) | |
tree | 7011642746984633573c9a2d993d58dfd12ee44b /libavformat/dashenc.c | |
parent | d94b11a721385aa406187da8f49380f29be0fa7e (diff) | |
parent | 9f61abc8111c7c43f49ca012e957a108b9cc7610 (diff) | |
download | ffmpeg-bc9a5965c815cf7fd998d8ce14a18b8e861dd9ce.tar.gz |
Merge commit '9f61abc8111c7c43f49ca012e957a108b9cc7610'
This also deprecates our old duplicated callbacks.
* commit '9f61abc8111c7c43f49ca012e957a108b9cc7610':
lavf: allow custom IO for all files
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavformat/dashenc.c')
-rw-r--r-- | libavformat/dashenc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index a1147398ef..1dd1a9d279 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -448,8 +448,7 @@ static int write_manifest(AVFormatContext *s, int final) AVDictionaryEntry *title = av_dict_get(s->metadata, "title", NULL, 0); snprintf(temp_filename, sizeof(temp_filename), "%s.tmp", s->filename); - ret = ffio_open_whitelist(&out, temp_filename, AVIO_FLAG_WRITE, - &s->interrupt_callback, NULL, s->protocol_whitelist); + ret = s->io_open(s, &out, temp_filename, AVIO_FLAG_WRITE, NULL); if (ret < 0) { av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", temp_filename); return ret; @@ -549,7 +548,7 @@ static int write_manifest(AVFormatContext *s, int final) avio_printf(out, "\t</Period>\n"); avio_printf(out, "</MPD>\n"); avio_flush(out); - avio_close(out); + ff_format_io_close(s, &out); return ff_rename(temp_filename, s->filename, s); } @@ -624,6 +623,9 @@ static int dash_write_header(AVFormatContext *s) os->ctx = ctx; ctx->oformat = oformat; ctx->interrupt_callback = s->interrupt_callback; + ctx->opaque = s->opaque; + ctx->io_close = s->io_close; + ctx->io_open = s->io_open; if (!(st = avformat_new_stream(ctx, NULL))) { ret = AVERROR(ENOMEM); |