From: Steinar H. Gunderson Date: Wed, 27 Jul 2016 18:34:55 +0000 (+0200) Subject: Handle error messages from nice(); fixes a warning. X-Git-Tag: 1.3.3~5 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b6cba2f3a010733f8f7f67c9d43ce38278965356;p=nageru Handle error messages from nice(); fixes a warning. --- diff --git a/x264_encoder.cpp b/x264_encoder.cpp index 756d673..f77549d 100644 --- a/x264_encoder.cpp +++ b/x264_encoder.cpp @@ -183,7 +183,10 @@ void X264Encoder::init_x264() void X264Encoder::encoder_thread_func() { - nice(5); // Note that x264 further nices some of its threads. + if (nice(5) == -1) { // Note that x264 further nices some of its threads. + perror("nice()"); + // No exit; it's not fatal. + } init_x264(); bool frames_left;