We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c0abdc3 commit d232064Copy full SHA for d232064
1 file changed
src/software/resampling/context.rs
@@ -149,12 +149,7 @@ impl Context {
149
150
/// Get the remaining delay.
151
pub fn delay(&self) -> Option<Delay> {
152
- unsafe {
153
- match swr_get_delay(self.as_ptr() as *mut _, 1) {
154
- 0 => None,
155
- _ => Some(Delay::from(self)),
156
- }
157
+ unsafe { Some(Delay::from(self)).filter(|d| d.output > 0) }
158
}
159
160
/// Run the resampler from the given input to the given output.
0 commit comments