mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-20 07:45:26 +03:00
add ffprobe error handling
This commit is contained in:
@@ -238,8 +238,11 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
|
|
||||||
var result = _jsonSerializer.DeserializeFromStream<InternalMediaInfoResult>(process.StandardOutput.BaseStream);
|
var result = _jsonSerializer.DeserializeFromStream<InternalMediaInfoResult>(process.StandardOutput.BaseStream);
|
||||||
|
|
||||||
if (result != null)
|
if (result.streams == null && result.format == null)
|
||||||
{
|
{
|
||||||
|
throw new ApplicationException("ffprobe failed - streams and format are both null.");
|
||||||
|
}
|
||||||
|
|
||||||
if (result.streams != null)
|
if (result.streams != null)
|
||||||
{
|
{
|
||||||
// Normalize aspect ratio if invalid
|
// Normalize aspect ratio if invalid
|
||||||
@@ -285,7 +288,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
|
|
||||||
return mediaInfo;
|
return mediaInfo;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
StopProcess(processWrapper, 100, true);
|
StopProcess(processWrapper, 100, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user