Skip to content

Commit

Permalink
Check if dup frame didn't exist
Browse files Browse the repository at this point in the history
FBNeo can return dup frame flag before its first frame.
  • Loading branch information
sergystepanov committed Mar 21, 2024
1 parent 4d5033f commit 84f5569
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/worker/caged/libretro/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,17 @@ func (f *Frontend) handleVideo(data []byte, delta int32, fi nanoarch.FrameInfo)
}

func (f *Frontend) handleDup() {
f.onVideo(*lastFrame)
if lastFrame != nil {
f.onVideo(*lastFrame)
}
}

func (f *Frontend) Shutdown() {
f.mu.Lock()
f.nano.Shutdown()
f.SetAudioCb(noAudio)
f.SetVideoCb(noVideo)
lastFrame = nil
f.mu.Unlock()
f.log.Debug().Msgf("frontend shutdown done")
}
Expand Down

0 comments on commit 84f5569

Please sign in to comment.