]> git.sesse.net Git - nageru/commitdiff
Handle error messages from nice(); fixes a warning.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 27 Jul 2016 18:34:55 +0000 (20:34 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 27 Jul 2016 18:34:55 +0000 (20:34 +0200)
x264_encoder.cpp

index 756d673bfb40b2adc6588992e3b78c2fd3b14d3f..f77549d98c7d749a0a29ae89a213a3f3e903a285 100644 (file)
@@ -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;