Merge pull request #51 from sdroege/timeouts

Only consider timeouts if configure bigger than 0
This commit is contained in:
Ruben Gonzalez 2020-09-07 20:20:45 +02:00 committed by GitHub
commit c1d9c0e958
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -907,7 +907,7 @@ impl Receiver<VideoReceiver> {
);
return Err(gst::FlowError::Error);
}
Ok(None) if timer.elapsed().as_millis() >= timeout as u128 => {
Ok(None) if timeout > 0 && timer.elapsed().as_millis() >= timeout as u128 => {
gst_debug!(self.0.cat, obj: element, "Timed out -- assuming EOS",);
return Err(gst::FlowError::Eos);
}
@ -1335,7 +1335,7 @@ impl Receiver<AudioReceiver> {
);
return Err(gst::FlowError::Error);
}
Ok(None) if timer.elapsed().as_millis() >= timeout as u128 => {
Ok(None) if timeout > 0 && timer.elapsed().as_millis() >= timeout as u128 => {
gst_debug!(self.0.cat, obj: element, "Timed out -- assuming EOS",);
return Err(gst::FlowError::Eos);
}