[x265] [PATCH 2 of 2] encoder: abort on failure to open CSV log file for write
Steve Borho
steve at borho.org
Wed Jan 28 22:29:20 CET 2015
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1422480542 21600
# Wed Jan 28 15:29:02 2015 -0600
# Node ID d6be1209b85d7f5ac318c0ca272dd87a8656ae71
# Parent dd004d21656cd75e4fe2fd8ae2eb25a4250b7485
encoder: abort on failure to open CSV log file for write
If the user specified a log file, then they probably do not want the encode to
be started if the log file failed to open.
diff -r dd004d21656c -r d6be1209b85d source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp Wed Jan 28 15:25:25 2015 -0600
+++ b/source/encoder/encoder.cpp Wed Jan 28 15:29:02 2015 -0600
@@ -221,6 +221,12 @@
fputs(summaryCSVHeader, m_csvfpt);
}
}
+
+ if (!m_csvfpt)
+ {
+ x265_log(m_param, X265_LOG_ERROR, "Unable to open CSV log file <%s>, aborting\n", m_param->csvfn);
+ m_aborted = true;
+ }
}
if (m_frameEncoder)
More information about the x265-devel
mailing list