[FFmpeg-cvslog] avformat/img2enc: return error if image rename fails
Marton Balint
git at videolan.org
Sun Feb 14 01:36:36 CET 2016
ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Thu Feb 11 01:37:37 2016 +0100| [0250fc2146b36ace8b8db904b884f70c9393b105] | committer: Marton Balint
avformat/img2enc: return error if image rename fails
Signed-off-by: Marton Balint <cus at passwd.hu>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0250fc2146b36ace8b8db904b884f70c9393b105
---
libavformat/img2enc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c
index a118e73..280d598 100644
--- a/libavformat/img2enc.c
+++ b/libavformat/img2enc.c
@@ -180,7 +180,9 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
if (!img->is_pipe) {
ff_format_io_close(s, &pb[0]);
for (i = 0; i < nb_renames; i++) {
- ff_rename(img->tmp[i], img->target[i], s);
+ int ret = ff_rename(img->tmp[i], img->target[i], s);
+ if (ret < 0)
+ return ret;
}
}
More information about the ffmpeg-cvslog
mailing list