mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-26 03:21:03 +00:00
utils: streamproducer: Add #[must_use]
attribute to add_consumer()
Simply discarding the result will immediately disconnect it again, which was likely not intended and can easily lead to bugs. Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/432 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1189>
This commit is contained in:
parent
8aa3e4417c
commit
f8d17555c5
1 changed files with 1 additions and 0 deletions
|
@ -40,6 +40,7 @@ impl Eq for StreamProducer {}
|
|||
/// Link between a `StreamProducer` and a consumer, disconnecting the link on `Drop`.
|
||||
/// The producer and consumer will stay alive while the link is.
|
||||
#[derive(Debug)]
|
||||
#[must_use]
|
||||
pub struct ConsumptionLink {
|
||||
consumer: gst_app::AppSrc,
|
||||
producer: Option<StreamProducer>,
|
||||
|
|
Loading…
Reference in a new issue