fix: disable next frame and previous frame for audio
This commit is contained in:
parent
2c6f8599ee
commit
edb755eefc
1 changed files with 6 additions and 2 deletions
|
|
@ -1409,7 +1409,9 @@ impl Application for App {
|
||||||
}
|
}
|
||||||
|
|
||||||
Message::NextFrame => {
|
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(
|
video.pipeline().send_event(gst::event::Step::new(
|
||||||
gst::format::Buffers::from_u64(1),
|
gst::format::Buffers::from_u64(1),
|
||||||
1.0,
|
1.0,
|
||||||
|
|
@ -1421,7 +1423,9 @@ impl Application for App {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Message::PreviousFrame => {
|
Message::PreviousFrame => {
|
||||||
if let Some(video) = &mut self.video_opt {
|
if let Some(video) = &mut self.video_opt
|
||||||
|
&& video.has_video()
|
||||||
|
{
|
||||||
// TODO: Improve Accuracy.
|
// TODO: Improve Accuracy.
|
||||||
let current = video.position();
|
let current = video.position();
|
||||||
let fps = get_framerate(video).unwrap_or(30.0);
|
let fps = get_framerate(video).unwrap_or(30.0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue