summaryrefslogtreecommitdiffstats
path: root/src/audio_player.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio_player.rs')
-rw-r--r--src/audio_player.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/audio_player.rs b/src/audio_player.rs
index 68fcc7b..97a61cd 100644
--- a/src/audio_player.rs
+++ b/src/audio_player.rs
@@ -231,13 +231,12 @@ impl AudioPlayer {
Ok(())
}
- pub fn stop_current(&self) {
+ pub fn stop_current(&self) -> Result<(), AudioPlayerError> {
info!("Stopping pipeline, sending EOS");
- let handled = self.http_src.send_event(gst::Event::new_eos().build());
- if !handled {
- warn!("EOS event was not handled");
- }
+ self.bus.post(&gst::Message::new_eos().build())?;
+
+ Ok(())
}
fn send_state(&self, state: State) {