fix: disable next frame and previous frame for audio

This commit is contained in:
Ashley Wulber 2026-04-06 15:07:35 -04:00
parent 2c6f8599ee
commit edb755eefc

View file

@ -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);