From 1f0cd5add0f4a0b88925b674591a583c7d6061b4 Mon Sep 17 00:00:00 2001 From: lordmulder Date: Sun, 10 Nov 2013 18:32:37 +0100 Subject: [PATCH] Improved logging output, if Avisynth (Avs2YUV) or VapurSynth (vspipe) crashes. --- src/thread_encode.cpp | 27 ++++++++++++++++++++++++--- src/version.h | 2 +- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/thread_encode.cpp b/src/thread_encode.cpp index 6b967ef..cf54a6a 100644 --- a/src/thread_encode.cpp +++ b/src/thread_encode.cpp @@ -557,7 +557,17 @@ bool EncodeThread::runEncodingPass(bool x264_x64, bool x264_10bit, bool avs2yuv_ { if(!(bTimeout || bAborted)) { - log(tr("\nWARNING: Input process exited with error code: %1").arg(QString::number(processInput.exitCode()))); + const int exitCode = processInput.exitCode(); + log(tr("\nWARNING: Input process exited with error (code: %1), your encode might be *incomplete* !!!").arg(QString::number(exitCode))); + if((inputType == INPUT_AVISYN) && ((exitCode < 0) || (exitCode > 2))) + { + log(tr("\nIMPORTANT: The Avs2YUV process terminated abnormally. This means Avisynth or one of your Avisynth-Plugin's just crashed.")); + log(tr("IMPORTANT: Please fix your Avisynth script and try again! If you use Avisynth-MT, try using a *stable* Avisynth instead!")); + } + if((inputType == INPUT_VAPOUR) && ((exitCode < 0) || (exitCode > 1))) + { + log(tr("\nIMPORTANT: The Vapoursynth process terminated abnormally. This means Vapoursynth or one of your Vapoursynth-Plugin's just crashed.")); + } } } @@ -1112,7 +1122,13 @@ bool EncodeThread::checkPropertiesAvisynth(bool x64, unsigned int &frames) { if(!(bTimeout || bAborted)) { - log(tr("\nPROCESS EXITED WITH ERROR CODE: %1").arg(QString::number(process.exitCode()))); + const int exitCode = process.exitCode(); + log(tr("\nPROCESS EXITED WITH ERROR CODE: %1").arg(QString::number(exitCode))); + if((exitCode < 0) || (exitCode > 2)) + { + log(tr("\nIMPORTANT: The Avs2YUV process terminated abnormally. This means Avisynth or one of your Avisynth-Plugin's just crashed.")); + log(tr("IMPORTANT: Please fix your Avisynth script and try again! If you use Avisynth-MT, try using a *stable* Avisynth instead!")); + } } return false; } @@ -1254,7 +1270,12 @@ bool EncodeThread::checkPropertiesVapoursynth(/*const QString &vspipePath,*/ uns { if(!(bTimeout || bAborted)) { - log(tr("\nPROCESS EXITED WITH ERROR CODE: %1").arg(QString::number(process.exitCode()))); + const int exitCode = process.exitCode(); + log(tr("\nPROCESS EXITED WITH ERROR CODE: %1").arg(QString::number(exitCode))); + if((exitCode < 0) || (exitCode > 1)) + { + log(tr("\nIMPORTANT: The Vapoursynth process terminated abnormally. This means Vapoursynth or one of your Vapoursynth-Plugin's just crashed.")); + } } return false; } diff --git a/src/version.h b/src/version.h index 2114ef7..34c2646 100644 --- a/src/version.h +++ b/src/version.h @@ -26,7 +26,7 @@ #define VER_X264_MAJOR 2 #define VER_X264_MINOR 2 #define VER_X264_PATCH 5 -#define VER_X264_BUILD 620 +#define VER_X264_BUILD 623 #define VER_X264_MINIMUM_REV 2363 #define VER_X264_CURRENT_API 140