aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorFelix Kaaman <tmtu@tmtu.ee>2020-01-27 22:32:52 +0100
committerJokler <jokler@protonmail.com>2020-01-27 22:32:52 +0100
commitb85ec0cedaf28b5252162b365881520fdb80c452 (patch)
treec97b91f3c2999b84c9931d5b2acfd8d645f5a3f5 /src/main.rs
parenta6e9551c19e082c0e12f1518300b6459e4791b95 (diff)
downloadpokebot-b85ec0cedaf28b5252162b365881520fdb80c452.tar.gz
pokebot-b85ec0cedaf28b5252162b365881520fdb80c452.zip
Change method of sending EOS to GStreamer pipeline (#24)
Uses message bus instead of events to elements
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index d1b34df..f4f7559 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -192,7 +192,7 @@ impl Application {
if !self.player.is_started() {
if !playlist.is_empty() {
- self.player.stop_current();
+ self.player.stop_current()?;
}
} else {
self.player.play()?;
@@ -214,7 +214,7 @@ impl Application {
let playlist = self.playlist.lock().expect("Mutex was not poisoned");
if !playlist.is_empty() {
info!("Skipping to next track");
- self.player.stop_current();
+ self.player.stop_current()?;
} else {
info!("Playlist empty, cannot skip");
self.player.reset()?;