]> git.sesse.net Git - ffmpeg/commitdiff
avformat/internal: log underlying error with ff_rename failure
authorAman Gupta <aman@tmm1.net>
Fri, 22 Dec 2017 23:17:15 +0000 (15:17 -0800)
committerAman Gupta <aman@tmm1.net>
Sat, 23 Dec 2017 02:00:47 +0000 (18:00 -0800)
Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
libavformat/internal.h

index 36a57214cede9960130e5004be64cb6c0cf646e0..de4b7846343f1af00f054f261cd33ad1bea46b0b 100644 (file)
@@ -542,7 +542,7 @@ static inline int ff_rename(const char *oldpath, const char *newpath, void *logc
     if (rename(oldpath, newpath) == -1) {
         ret = AVERROR(errno);
         if (logctx)
-            av_log(logctx, AV_LOG_ERROR, "failed to rename file %s to %s\n", oldpath, newpath);
+            av_log(logctx, AV_LOG_ERROR, "failed to rename file %s to %s: %s\n", oldpath, newpath, av_err2str(ret));
     }
     return ret;
 }