From ca4fa82ffef5d3ff44dc766568c9e2eb48ed81a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 22 May 2016 16:23:43 +0300 Subject: [PATCH] Make it an requirement to implement Source::do_seek() --- src/rsfilesrc.rs | 4 ++++ src/rssource.rs | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rsfilesrc.rs b/src/rsfilesrc.rs index 4a115ee0..ceb69467 100644 --- a/src/rsfilesrc.rs +++ b/src/rsfilesrc.rs @@ -159,5 +159,9 @@ impl Source for FileSrc { }, } } + + fn do_seek(&mut self, _: u64, _: u64) -> bool { + true + } } diff --git a/src/rssource.rs b/src/rssource.rs index 8c8230b4..064dab6c 100644 --- a/src/rssource.rs +++ b/src/rssource.rs @@ -30,9 +30,7 @@ pub trait Source: Sync + Send { fn start(&mut self) -> bool; fn stop(&mut self) -> bool; fn fill(&mut self, offset: u64, data: &mut [u8]) -> Result; - fn do_seek(&mut self, _: u64, _: u64) -> bool { - return true; - } + fn do_seek(&mut self, start: u64, stop: u64) -> bool; } #[no_mangle]