add ffprobe error handling
This commit is contained in:
parent
5637142100
commit
9f1a8d1dc3
|
@ -238,8 +238,11 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
|
||||
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)
|
||||
{
|
||||
// Normalize aspect ratio if invalid
|
||||
|
@ -285,7 +288,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
|
||||
return mediaInfo;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
StopProcess(processWrapper, 100, true);
|
||||
|
|
Loading…
Reference in New Issue
Block a user