Minor fixes

This commit is contained in:
Malte Rosenbjerg 2021-10-21 19:44:22 +02:00
parent 26fcfcc206
commit 06da927c7e

View file

@ -116,12 +116,9 @@ private static (FFMpegArguments, Action<FFMpegArgumentOptions> outputOptions) Bu
{
captureTime ??= TimeSpan.FromSeconds(source.Duration.TotalSeconds / 3);
size = PrepareSnapshotSize(source, size);
if (streamIndex == null)
{
streamIndex = source.PrimaryVideoStream?.Index
?? source.VideoStreams.First()?.Index
?? 0;
}
streamIndex ??= source.PrimaryVideoStream?.Index
?? source.VideoStreams.FirstOrDefault()?.Index
?? 0;
return (FFMpegArguments
.FromFileInput(input, false, options => options