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); captureTime ??= TimeSpan.FromSeconds(source.Duration.TotalSeconds / 3);
size = PrepareSnapshotSize(source, size); size = PrepareSnapshotSize(source, size);
if (streamIndex == null) streamIndex ??= source.PrimaryVideoStream?.Index
{ ?? source.VideoStreams.FirstOrDefault()?.Index
streamIndex = source.PrimaryVideoStream?.Index
?? source.VideoStreams.First()?.Index
?? 0; ?? 0;
}
return (FFMpegArguments return (FFMpegArguments
.FromFileInput(input, false, options => options .FromFileInput(input, false, options => options