Fix 12 code analysis errors in MediaEncoding projects - use LoggerMessage source generators and specific exception types

This commit is contained in:
2026-04-29 08:24:34 -04:00
parent aead802df6
commit 786c61ba09
6 changed files with 62 additions and 14 deletions
@@ -50,10 +50,13 @@ public static class FfProbeKeyframeExtractor
{
process.PriorityClass = ProcessPriorityClass.BelowNormal;
}
catch
catch (InvalidOperationException)
{
// We do not care if process priority setting fails
// Ideally log a warning but this does not have a logger available
// Process may have already exited - ignore
}
catch (System.ComponentModel.Win32Exception)
{
// Priority setting may not be supported on this platform - ignore
}
return ParseStream(process.StandardOutput);
@@ -67,9 +70,13 @@ public static class FfProbeKeyframeExtractor
process.Kill();
}
}
catch
catch (InvalidOperationException)
{
// We do not care if this fails
// Process may have already exited - ignore
}
catch (System.ComponentModel.Win32Exception)
{
// Process termination may fail - ignore
}
throw;