summaryrefslogtreecommitdiff
path: root/libavformat/dashenc.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2020-01-05 16:54:08 +0100
committerMarton Balint <cus@passwd.hu>2020-01-19 22:17:04 +0100
commitb5dba152ef614c21e0537a7894ef9227b323f21d (patch)
treeaca86f90e2101e851d6d5294c30511027d529ab6 /libavformat/dashenc.c
parent19b9f8996e1a6a17830123b4bc22dbc735c1570e (diff)
avformat/dashenc: use ff_rename instead of avpriv_io_move
ff_rename always logs the error message. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/dashenc.c')
-rw-r--r--libavformat/dashenc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 3d8515d9ca..f555f208a7 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -583,9 +583,7 @@ static void write_hls_media_playlist(OutputStream *os, AVFormatContext *s,
dashenc_io_close(s, &c->m3u8_out, temp_filename_hls);
if (use_rename)
- if (avpriv_io_move(temp_filename_hls, filename_hls) < 0) {
- av_log(os->ctx, AV_LOG_WARNING, "renaming file %s to %s failed\n\n", temp_filename_hls, filename_hls);
- }
+ ff_rename(temp_filename_hls, filename_hls, os->ctx);
}
static int flush_init_segment(AVFormatContext *s, OutputStream *os)
@@ -1186,7 +1184,7 @@ static int write_manifest(AVFormatContext *s, int final)
dashenc_io_close(s, &c->mpd_out, temp_filename);
if (use_rename) {
- if ((ret = avpriv_io_move(temp_filename, s->url)) < 0)
+ if ((ret = ff_rename(temp_filename, s->url, s)) < 0)
return ret;
}
@@ -1268,7 +1266,7 @@ static int write_manifest(AVFormatContext *s, int final)
}
dashenc_io_close(s, &c->m3u8_out, temp_filename);
if (use_rename)
- if ((ret = avpriv_io_move(temp_filename, filename_hls)) < 0)
+ if ((ret = ff_rename(temp_filename, filename_hls, s)) < 0)
return ret;
c->master_playlist_created = 1;
}
@@ -1875,7 +1873,7 @@ static int dash_flush(AVFormatContext *s, int final, int stream)
dashenc_io_close(s, &os->out, os->temp_path);
if (use_rename) {
- ret = avpriv_io_move(os->temp_path, os->full_path);
+ ret = ff_rename(os->temp_path, os->full_path, os->ctx);
if (ret < 0)
break;
}