]> git.sesse.net Git - casparcg/commitdiff
Fix CPU hogging on EOF in ffmpeg producer.
authorPeter Keuter <github@peterkeuter.nl>
Sat, 6 Aug 2016 19:00:56 +0000 (21:00 +0200)
committerGitHub <noreply@github.com>
Sat, 6 Aug 2016 19:00:56 +0000 (21:00 +0200)
This PR fixes the CPU-usage going up when a file has finished playing in the ffmpeg-producer.

modules/ffmpeg/producer/input/input.cpp

index 9d4acbd235e9fd72056646356e7c96fb1c4d5e6b..13ca48d5e16aee23ae0d95e2536ea66c2f15eccf 100644 (file)
@@ -385,7 +385,7 @@ private:
                                {
                                        boost::unique_lock<boost::mutex> lock(mutex_);
 
-                                       while(full() && !seek_target_ && is_running_)
+                                       while((eof_ || full()) && !seek_target_ && is_running_)
                                                cond_.wait(lock);
                                        
                                        tick();