mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-01-02 06:48:13 +00:00
Fixed: Zero length file causes MediaInfo hanging in 100% cpu load.
This commit is contained in:
@@ -189,6 +189,11 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
||||
|
||||
public int Open(Stream stream)
|
||||
{
|
||||
if (stream.Length < 1024)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var isValid = (int)MediaInfo_Open_Buffer_Init(_handle, stream.Length, 0);
|
||||
if (isValid == 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user