mirror of
https://github.com/Radarr/Radarr
synced 2025-01-19 14:11:40 +00:00
Fixed: Zero length file causes MediaInfo hanging in 100% cpu load. (#1340)
This commit is contained in:
parent
17118cf24d
commit
3403ddf993
1 changed files with 6 additions and 1 deletions
|
@ -189,6 +189,11 @@ public int Open(string fileName)
|
||||||
|
|
||||||
public int Open(Stream stream)
|
public int Open(Stream stream)
|
||||||
{
|
{
|
||||||
|
if (stream.Length < 1024)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
var isValid = (int)MediaInfo_Open_Buffer_Init(_handle, stream.Length, 0);
|
var isValid = (int)MediaInfo_Open_Buffer_Init(_handle, stream.Length, 0);
|
||||||
if (isValid == 1)
|
if (isValid == 1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue