From c836c956f818024e3bd3323bf4eb4f1ff96dc833 Mon Sep 17 00:00:00 2001 From: George Hilliard Date: Thu, 18 Jun 2020 14:41:23 -0500 Subject: [PATCH] MaybeAppSrc: Don't require "success" from EOS push Gstreamer's definition of success is too narrow, and we panic on a "flushing" result. Addresses #13 on GitHub. --- src/gst.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gst.rs b/src/gst.rs index 1fef235..f399f2e 100644 --- a/src/gst.rs +++ b/src/gst.rs @@ -124,7 +124,8 @@ mod maybe_app_src { /// Flushes data to Gstreamer on a problem communicating with the underlying video source. pub fn on_stream_error(&mut self) { if let Some(src) = self.try_get_src() { - src.end_of_stream().unwrap(); + // Ignore "errors" from Gstreamer such as FLUSHING, which are not really errors. + let _ = src.end_of_stream(); } }