Skip to content
Snippets Groups Projects
Commit 15f6d173 authored by Guillaume Roguez's avatar Guillaume Roguez
Browse files

media: fix wrong framerate emulation timing

A regression introduced by commit 88405c00 causes
framerate emulation not using the correct timing.
milliseconds was wrongly used in place of microseconds.
This patch changes this fact.

Change-Id: I29453582ce4f0a8f34838caea4a2ee9be5592dbe
Tuleap: #914
parent ed58b69e
Branches
Tags
No related merge requests found
......@@ -327,7 +327,7 @@ MediaDecoder::decode(VideoFrame& result)
auto target = startTime_ + static_cast<std::int64_t>(frame_time.real() * 1e6);
auto now = av_gettime();
if (target > now) {
std::this_thread::sleep_for(std::chrono::milliseconds(target - now));
std::this_thread::sleep_for(std::chrono::microseconds(target - now));
}
}
return Status::FrameFinished;
......@@ -378,7 +378,7 @@ MediaDecoder::decode(const AudioFrame& decodedFrame)
auto target = startTime_ + static_cast<std::int64_t>(frame_time.real() * 1e6);
auto now = av_gettime();
if (target > now) {
std::this_thread::sleep_for(std::chrono::milliseconds(target - now));
std::this_thread::sleep_for(std::chrono::microseconds(target - now));
}
}
return Status::FrameFinished;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment