mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-02-16 19:15:30 +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`.
|
/// Link between a `StreamProducer` and a consumer, disconnecting the link on `Drop`.
|
||||||
/// The producer and consumer will stay alive while the link is.
|
/// The producer and consumer will stay alive while the link is.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
#[must_use]
|
||||||
pub struct ConsumptionLink {
|
pub struct ConsumptionLink {
|
||||||
consumer: gst_app::AppSrc,
|
consumer: gst_app::AppSrc,
|
||||||
producer: Option<StreamProducer>,
|
producer: Option<StreamProducer>,
|
||||||
|
|
Loading…
Reference in a new issue