1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

libxvid: Check return value of write() call

libavcodec/libxvid_rc.c:106:9: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
This commit is contained in:
Diego Biurrun 2015-12-08 10:22:15 +01:00
parent e5e8a26dcf
commit f7d183f084

View File

@ -87,7 +87,10 @@ av_cold int ff_xvid_rate_control_init(MpegEncContext *s)
(rce->i_tex_bits + rce->p_tex_bits + rce->misc_bits + 7) / 8,
(rce->header_bits + rce->mv_bits + 7) / 8);
write(fd, tmp, strlen(tmp));
if (strlen(tmp) > write(fd, tmp, strlen(tmp))) {
av_log(s, AV_LOG_ERROR, "Cannot write to temporary pass2 file.\n");
return AVERROR(EIO);
}
}
close(fd);