Don't emit video frame rate changes when they don't happen.
authorCarl Hetherington <cth@carlh.net>
Wed, 7 Nov 2018 00:00:07 +0000 (00:00 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 7 Nov 2018 00:00:07 +0000 (00:00 +0000)
src/lib/content.cc

index 3ab4a5959a81cbb8ecdc42eca672b822add569c7..6f5d23fd5ab04be2007c9b9e3b298d4b9c809f5f 100644 (file)
@@ -400,6 +400,9 @@ Content::set_video_frame_rate (double r)
 
        {
                boost::mutex::scoped_lock lm (_mutex);
 
        {
                boost::mutex::scoped_lock lm (_mutex);
+               if (_video_frame_rate && fabs(r - *_video_frame_rate) < VIDEO_FRAME_RATE_EPSILON) {
+                       cc.abort();
+               }
                _video_frame_rate = r;
        }
 
                _video_frame_rate = r;
        }