Revert "Added a watchdog of 1 second to avoid freezes"
This reverts commit 743211e6d1
.
This commit is contained in:
parent
743211e6d1
commit
6265f6ebd5
2 changed files with 1 additions and 4 deletions
|
@ -295,7 +295,7 @@ AVFramePtr Codec::GetCurrentFrame() {
|
||||||
std::chrono::microseconds min_frame_interval =
|
std::chrono::microseconds min_frame_interval =
|
||||||
std::chrono::microseconds(1000 / Settings::values.video_framerate.GetValue() * 1000);
|
std::chrono::microseconds(1000 / Settings::values.video_framerate.GetValue() * 1000);
|
||||||
|
|
||||||
if (elapsed < min_frame_interval || elapsed > watchdog_waitFrameTimeout) {
|
if (elapsed < min_frame_interval) {
|
||||||
std::this_thread::sleep_for(min_frame_interval - elapsed);
|
std::this_thread::sleep_for(min_frame_interval - elapsed);
|
||||||
now = std::chrono::steady_clock::now();
|
now = std::chrono::steady_clock::now();
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,9 +60,6 @@ public:
|
||||||
|
|
||||||
std::chrono::steady_clock::time_point last_frame_time = std::chrono::steady_clock::now();
|
std::chrono::steady_clock::time_point last_frame_time = std::chrono::steady_clock::now();
|
||||||
|
|
||||||
const std::chrono::microseconds watchdog_waitFrameTimeout =
|
|
||||||
std::chrono::microseconds(1000000); // 1 second
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void InitializeAvCodecContext();
|
void InitializeAvCodecContext();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue