Commit 3830307c by Drew Hill

fix not initialized error

parent 84afad07
......@@ -79,6 +79,9 @@ public final class VideoFrameReleaseTimeHelper {
private VideoFrameReleaseTimeHelper(double defaultDisplayRefreshRate) {
useDefaultDisplayVsync = defaultDisplayRefreshRate != DISPLAY_REFRESH_RATE_UNKNOWN;
if (useDefaultDisplayVsync) {
vsyncSampler = VSyncSampler.getInstance();
}
}
/**
......@@ -128,7 +131,6 @@ public final class VideoFrameReleaseTimeHelper {
private void setSync(double defaultDisplayRefreshRate) {
if (useDefaultDisplayVsync) {
vsyncSampler = VSyncSampler.getInstance();
vsyncDurationNs = (long) (C.NANOS_PER_SECOND / defaultDisplayRefreshRate);
vsyncOffsetNs = (vsyncDurationNs * VSYNC_OFFSET_PERCENTAGE) / 100;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment