From f8db47dba625a2a43681adc8aaaa471abbc8265b Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Mon, 29 Apr 2024 06:43:30 +0200 Subject: [PATCH] Skip audio files - thx Leon :) Work on #8272 --- src/ui/Forms/GenerateVideoWithHardSubs.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ui/Forms/GenerateVideoWithHardSubs.cs b/src/ui/Forms/GenerateVideoWithHardSubs.cs index 93432fa1d..fad969fe1 100644 --- a/src/ui/Forms/GenerateVideoWithHardSubs.cs +++ b/src/ui/Forms/GenerateVideoWithHardSubs.cs @@ -2207,6 +2207,12 @@ namespace Nikse.SubtitleEdit.Forms height = vInfo.Height; } + if (width == 0 || height == 0) + { + SeLogger.Error("Skipping burn-in file with no video: " + fileName); + return; // skip audio or damaged files + } + var listViewItem = new ListViewItem(fileName); listViewItem.Tag = item; listViewItem.SubItems.Add($"{width}x{height}");