From 1e9a52bd6e4ec15ebac44198cc0c8e404e08911f Mon Sep 17 00:00:00 2001 From: Sean McNamara Date: Mon, 6 Apr 2020 23:34:20 -0400 Subject: [PATCH] Fix auto disposal of pipeline that needs to stay in struct --- playback/src/audio_backend/gstreamer.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/playback/src/audio_backend/gstreamer.rs b/playback/src/audio_backend/gstreamer.rs index c7181bc4..ae598d0b 100644 --- a/playback/src/audio_backend/gstreamer.rs +++ b/playback/src/audio_backend/gstreamer.rs @@ -5,8 +5,10 @@ use gst::prelude::*; use gst::*; use zerocopy::*; +#[allow(dead_code)] pub struct GstreamerSink { - tx: SyncSender> + tx: SyncSender>, + pipeline: gst::Pipeline } impl Open for GstreamerSink { @@ -75,7 +77,8 @@ impl Open for GstreamerSink { pipeline.set_state(gst::State::Playing).expect("Unable to set the pipeline to the `Playing` state"); GstreamerSink { - tx: tx + tx: tx, + pipeline: pipeline } } }