mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
Merge pull request #50 from WeihanLi/optimize-skip_exists_check
return null when file not exits
This commit is contained in:
commit
97cb7e966b
1 changed files with 2 additions and 2 deletions
|
@ -390,7 +390,7 @@ public VideoInfo Convert(ArgumentContainer arguments, bool skipExistsCheck = fal
|
|||
throw new FFMpegException(FFMpegExceptionType.Conversion, "Could not process file without error");
|
||||
|
||||
_totalTime = TimeSpan.MinValue;
|
||||
return new VideoInfo(output);
|
||||
return output.Exists ? new VideoInfo(output) : null;
|
||||
}
|
||||
public async Task<VideoInfo> ConvertAsync(ArgumentContainer arguments, bool skipExistsCheck = false)
|
||||
{
|
||||
|
@ -401,7 +401,7 @@ public async Task<VideoInfo> ConvertAsync(ArgumentContainer arguments, bool skip
|
|||
throw new FFMpegException(FFMpegExceptionType.Conversion, "Could not process file without error");
|
||||
|
||||
_totalTime = TimeSpan.MinValue;
|
||||
return new VideoInfo(output);
|
||||
return output.Exists ? new VideoInfo(output) : null;
|
||||
}
|
||||
|
||||
private static (VideoInfo[] Input, FileInfo Output) GetInputOutput(ArgumentContainer arguments)
|
||||
|
|
Loading…
Reference in a new issue