mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-31 23:48:33 +00:00
Backport pull request #8516 from jellyfin/release-10.8.z
fix: kill ffprobe if keyframe parsing fails
Original-merge: 6d23de64c0
Merged-by: Claus Vium <cvium@users.noreply.github.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
committed by
Joshua M. Boniface
parent
812a4170ee
commit
f6533e4228
@@ -38,9 +38,28 @@ public static class FfProbeKeyframeExtractor
|
||||
EnableRaisingEvents = true
|
||||
};
|
||||
|
||||
process.Start();
|
||||
try
|
||||
{
|
||||
process.Start();
|
||||
|
||||
return ParseStream(process.StandardOutput);
|
||||
return ParseStream(process.StandardOutput);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!process.HasExited)
|
||||
{
|
||||
process.Kill();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// We do not care if this fails
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
internal static KeyframeData ParseStream(StreamReader reader)
|
||||
|
||||
Reference in New Issue
Block a user