utils/streamproducer: reset callbacks when removing consumer

This commit is contained in:
Guillaume Desmottes 2022-05-12 14:56:55 +02:00
parent 98cc289bcc
commit 351f070c8e

View file

@ -102,6 +102,7 @@ impl StreamProducer {
.is_some() .is_some()
{ {
gst::debug!(CAT, obj: &self.appsink, "Removed consumer {} ({:?})", name, consumer); gst::debug!(CAT, obj: &self.appsink, "Removed consumer {} ({:?})", name, consumer);
consumer.set_callbacks(gst_app::AppSrcCallbacks::builder().build());
} else { } else {
gst::debug!(CAT, obj: &self.appsink, "Consumer {} ({:?}) not found", name, consumer); gst::debug!(CAT, obj: &self.appsink, "Consumer {} ({:?}) not found", name, consumer);
} }