summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ikvm_video.cpp1
-rw-r--r--ikvm_video.hpp6
2 files changed, 7 insertions, 0 deletions
diff --git a/ikvm_video.cpp b/ikvm_video.cpp
index ed5ed92..0274967 100644
--- a/ikvm_video.cpp
+++ b/ikvm_video.cpp
@@ -155,6 +155,7 @@ bool Video::needsResize()
{
log<level::ERR>("Failed to query timings",
entry("ERROR=%s", strerror(errno)));
+ restart();
return false;
}
diff --git a/ikvm_video.hpp b/ikvm_video.hpp
index 0e5f3af..faaa57d 100644
--- a/ikvm_video.hpp
+++ b/ikvm_video.hpp
@@ -50,6 +50,12 @@ class Video
void start();
/* @brief Stops streaming from the video device */
void stop();
+ /* @brief Restarts streaming from the video device */
+ void restart()
+ {
+ stop();
+ start();
+ }
/*
* @brief Gets the desired video frame rate in frames per second
OpenPOWER on IntegriCloud