From ddde8050f540b3762a14bcd215a73d9d9c08ba84 Mon Sep 17 00:00:00 2001 From: tinyzimmer <38474291+tinyzimmer@users.noreply.github.com> Date: Sun, 4 Oct 2020 17:48:43 +0300 Subject: [PATCH] fix comment --- examples/gif-encoder/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/gif-encoder/main.go b/examples/gif-encoder/main.go index bb550d4..675c5f3 100644 --- a/examples/gif-encoder/main.go +++ b/examples/gif-encoder/main.go @@ -102,11 +102,11 @@ func encodeGif(mainLoop *gst.MainLoop) error { } // Fetch the result from the query. - _, val := query.ParseDuration() + _, duration := query.ParseDuration() - // This value is in nanoseconds. Since we told theee videorate element to produce 5 frames - // per second, we can use this value to calculate the total number of frames to expect. - totalFrames := int((time.Duration(val) * time.Nanosecond).Seconds()) * 5 + // This value is in nanoseconds. Since we told the videorate element to produce 5 frames + // per second, we know the total frames will be (duration / 1e+9) * 5. + totalFrames := int((time.Duration(duration) * time.Nanosecond).Seconds()) * 5 // Getting data out of the sink is done by setting callbacks. Each new sample // will be a new jpeg image from the pipeline.