avformat/dashenc: add avpriv_io_move return value check
authorSteven Liu <lq@chinaffmpeg.org>
Mon, 4 Dec 2017 04:06:26 +0000 (12:06 +0800)
committerSteven Liu <lq@chinaffmpeg.org>
Mon, 4 Dec 2017 04:06:26 +0000 (12:06 +0800)
fix cid: 1424883

Suggested-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
libavformat/dashenc.c

index 22ef310..5687530 100644 (file)
@@ -384,7 +384,9 @@ static void output_segment_list(OutputStream *os, AVIOContext *out, DASHContext
 
         avio_close(out_hls);
         if (use_rename)
-            avpriv_io_move(temp_filename_hls, filename_hls);
+            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);
+            }
     }
 
 }