From ab9f19095dcf55e429798f6799487e86eeb4ab7c Mon Sep 17 00:00:00 2001 From: Stu Date: Tue, 9 Dec 2025 18:51:41 -0500 Subject: [PATCH] Set video surface size and surface ffmpeg errors --- main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.go b/main.go index acf79ef..c582288 100644 --- a/main.go +++ b/main.go @@ -469,6 +469,7 @@ func (s *appState) buildComparePane(src *videoSource, onStop func(), setSess fun stageBG := canvas.NewRectangle(utils.MustHex("#0F1529")) stageBG.SetMinSize(fyne.NewSize(640, 360)) videoImg := canvas.NewImageFromResource(nil) + videoImg.SetMinSize(fyne.NewSize(960, 540)) // Populate a preview frame if available if len(src.PreviewFrames) == 0 { if frames, err := capturePreviewFrames(src.Path, src.Duration); err == nil && len(frames) > 0 { @@ -3922,6 +3923,9 @@ func (p *playSession) runVideo(offset float64) { fmt.Printf("❌ FATAL: ffmpeg not found in PATH: %v\n", pathErr) } logging.Debug(logging.CatFFMPEG, "video start failed: %v (%s)", err, errMsg) + fyne.Do(func() { + dialog.ShowError(fmt.Errorf("Failed to start video decode: %v\n%s", err, errMsg), fyne.CurrentApp().Driver().AllWindows()[0]) + }) return } fmt.Printf("✅ FFmpeg started (PID: %d) in %.3fs\n", cmd.Process.Pid, time.Since(startTime).Seconds()) @@ -3975,6 +3979,9 @@ func (p *playSession) runVideo(offset float64) { fmt.Printf(" FFmpeg error: %s\n", msg) } logging.Debug(logging.CatFFMPEG, "video read failed: %v (%s)", err, msg) + fyne.Do(func() { + dialog.ShowError(fmt.Errorf("Video decode failed: %v\n%s", err, msg), fyne.CurrentApp().Driver().AllWindows()[0]) + }) return }