mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-08 02:34:19 -04:00
Merge pull request #8516 from cvium/kill_ffprobe_when_extraction_crashes
This commit is contained in:
commit
6d23de64c0
@ -38,10 +38,29 @@ public static class FfProbeKeyframeExtractor
|
|||||||
EnableRaisingEvents = true
|
EnableRaisingEvents = true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
process.Start();
|
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)
|
internal static KeyframeData ParseStream(StreamReader reader)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user