mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Fix auto disposal of pipeline that needs to stay in struct
This commit is contained in:
parent
f192bd1079
commit
1e9a52bd6e
1 changed files with 5 additions and 2 deletions
|
@ -5,8 +5,10 @@ use gst::prelude::*;
|
||||||
use gst::*;
|
use gst::*;
|
||||||
use zerocopy::*;
|
use zerocopy::*;
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstreamerSink {
|
pub struct GstreamerSink {
|
||||||
tx: SyncSender<Vec<u8>>
|
tx: SyncSender<Vec<u8>>,
|
||||||
|
pipeline: gst::Pipeline
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Open for GstreamerSink {
|
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");
|
pipeline.set_state(gst::State::Playing).expect("Unable to set the pipeline to the `Playing` state");
|
||||||
|
|
||||||
GstreamerSink {
|
GstreamerSink {
|
||||||
tx: tx
|
tx: tx,
|
||||||
|
pipeline: pipeline
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue