avformat/img2enc: return error if image rename fails

Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint 2016-02-11 01:37:37 +01:00
parent 123ff81a45
commit 0250fc2146

View File

@ -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;
}
}