]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/dashenc.c
avcodec/mpeg12: Fix error return
[ffmpeg] / libavformat / dashenc.c
index a1147398eff81617d15307a16b9d36d6c7fd7f0f..1dd1a9d279b37c7985e33d2c4089ec3955f8e9ab 100644 (file)
@@ -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);