From b6cba2f3a010733f8f7f67c9d43ce38278965356 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Wed, 27 Jul 2016 20:34:55 +0200 Subject: [PATCH] Handle error messages from nice(); fixes a warning. --- x264_encoder.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.39.2