From edb755eefc572d46b3eb6c17c3fbf72f4fe37e93 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Mon, 6 Apr 2026 15:07:35 -0400 Subject: [PATCH] fix: disable next frame and previous frame for audio --- src/main.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 19f17f1..599dc87 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1409,7 +1409,9 @@ impl Application for App { } Message::NextFrame => { - if let Some(video) = &mut self.video_opt { + if let Some(video) = &mut self.video_opt + && video.has_video() + { video.pipeline().send_event(gst::event::Step::new( gst::format::Buffers::from_u64(1), 1.0, @@ -1421,7 +1423,9 @@ impl Application for App { } } Message::PreviousFrame => { - if let Some(video) = &mut self.video_opt { + if let Some(video) = &mut self.video_opt + && video.has_video() + { // TODO: Improve Accuracy. let current = video.position(); let fps = get_framerate(video).unwrap_or(30.0);