summaryrefslogtreecommitdiff
path: root/server/mjpeg-encoder.c
diff options
context:
space:
mode:
authorFrancois Gouget <fgouget@codeweavers.com>2015-12-05 13:06:08 +0100
committerJonathon Jongsma <jjongsma@redhat.com>2015-12-08 15:08:44 -0600
commitc8d5120ff06747d17f13dcb98cd7a3aea3671eba (patch)
tree5c541428af24b6ca6b061ddca2de1b39afb8fd0d /server/mjpeg-encoder.c
parent4ce4c4a5252a90cb0594e7fec2b183c69a66e77f (diff)
server: Define the MJPEG encoder warmup time in nanoseconds
Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Fabiano FidĂȘncio <fidencio@redhat.com>
Diffstat (limited to 'server/mjpeg-encoder.c')
-rw-r--r--server/mjpeg-encoder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/mjpeg-encoder.c b/server/mjpeg-encoder.c
index 3f541122..08af1eb9 100644
--- a/server/mjpeg-encoder.c
+++ b/server/mjpeg-encoder.c
@@ -68,7 +68,7 @@ static const int mjpeg_quality_samples[MJPEG_QUALITY_SAMPLE_NUM] = {20, 30, 40,
* are not necessarily related to mis-estimation of the bit rate, and we would
* like to wait till the stream stabilizes.
*/
-#define MJPEG_WARMUP_TIME 3000LL // 3 sec
+#define MJPEG_WARMUP_TIME 3000000000LL // 3 sec
enum {
MJPEG_QUALITY_EVAL_TYPE_SET,
@@ -996,7 +996,7 @@ static void mjpeg_encoder_decrease_bit_rate(MJpegEncoder *encoder)
uint64_t now;
now = red_get_monotonic_time();
- if (now - rate_control->warmup_start_time < MJPEG_WARMUP_TIME*1000*1000) {
+ if (now - rate_control->warmup_start_time < MJPEG_WARMUP_TIME) {
spice_debug("during warmup. ignoring");
return;
} else {