Fix UI thread update in unified player adapter

This commit is contained in:
Stu Leak 2026-01-07 02:20:53 -05:00
parent e81cc27ea8
commit 4eef2a0320

View File

@ -335,9 +335,10 @@ func (p *UnifiedPlayerAdapter) startFrameDisplayLoop() {
// Get frame from UnifiedPlayer // Get frame from UnifiedPlayer
frame, err := p.player.GetFrameImage() frame, err := p.player.GetFrameImage()
if err == nil && frame != nil { if err == nil && frame != nil {
// Update the Fyne canvas image fyne.CurrentApp().Driver().DoFromGoroutine(func() {
p.img.Image = frame p.img.Image = frame
p.img.Refresh() p.img.Refresh()
}, false)
} }
} }
p.mu.Unlock() p.mu.Unlock()