diff --git a/Cargo.lock b/Cargo.lock index 04602c0..d5dbbc1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -215,7 +215,7 @@ dependencies = [ [[package]] name = "gst-plugin-closedcaption" -version = "0.8.0" +version = "0.9.0" dependencies = [ "anyhow", "atomic_refcell", @@ -239,7 +239,7 @@ dependencies = [ [[package]] name = "gst-plugin-version-helper" -version = "0.8.0" +version = "0.9.0" dependencies = [ "chrono", ] diff --git a/src/main.rs b/src/main.rs index 59f7d3e..30067a7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -89,6 +89,8 @@ fn main_loop(pipeline: gst::Pipeline) -> Result<(), Error> { while RUNNING.load(Ordering::Relaxed) { if let Some(pipeline) = pipeline_weak.upgrade() { push_buffer(&pipeline, subtitles[sub_idx.next().unwrap_or(0)]); + } else { + break; } println!("pushed the buffer.. now waiting."); std::thread::sleep(Duration::from_secs(5));