Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrançois Laignel <fengalin@free.fr>2022-10-17 20:48:43 +0300
committerFrançois Laignel <fengalin@mailo.com>2022-10-18 13:36:59 +0300
commit8011eadfd2137b4c21fa8e6dfffe6891cb2be406 (patch)
tree1db00e75b8cc26362bda0cfc86fd424b27482440 /video/webp
parente66378d2544f9e39acfac18143cfac4afa8ae7ac (diff)
Use new format constructors
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1128
Diffstat (limited to 'video/webp')
-rw-r--r--video/webp/src/dec/imp.rs2
-rw-r--r--video/webp/tests/webpdec.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/video/webp/src/dec/imp.rs b/video/webp/src/dec/imp.rs
index 277f5692e..645f71e7f 100644
--- a/video/webp/src/dec/imp.rs
+++ b/video/webp/src/dec/imp.rs
@@ -203,7 +203,7 @@ impl WebPDec {
gst::error_msg!(gst::StreamError::Decode, ["Failed to get next frame"])
})?;
- let timestamp = frame.timestamp as u64 * gst::ClockTime::MSECOND;
+ let timestamp = (frame.timestamp as u64).mseconds();
let duration =
prev_timestamp.and_then(|prev_timestamp| timestamp.checked_sub(prev_timestamp));
diff --git a/video/webp/tests/webpdec.rs b/video/webp/tests/webpdec.rs
index a7b4e2c65..95451faf9 100644
--- a/video/webp/tests/webpdec.rs
+++ b/video/webp/tests/webpdec.rs
@@ -33,7 +33,7 @@ fn test_decode() {
let mut expected_timestamp: Option<gst::ClockTime> = Some(gst::ClockTime::ZERO);
let mut count = 0;
- let expected_duration: Option<gst::ClockTime> = Some(gst::ClockTime::from_nseconds(40_000_000));
+ let expected_duration: Option<gst::ClockTime> = Some(40_000_000.nseconds());
while let Some(buf) = h.try_pull() {
assert_eq!(buf.pts(), expected_timestamp);