From 7b32ba5a27fd64ab09f1d3270b5e36928163cb4b Mon Sep 17 00:00:00 2001 From: Dimitri Vranken Date: Thu, 16 Feb 2023 14:48:06 +0100 Subject: [PATCH] Fixed ambiguous method call The two constructors were causing issues with ambiguous method calls but are a good idea, so this is more of a workaround. Error message: The call is ambiguous between the following methods or properties: 'FFMpegCore.Pipes.RawVideoPipeSource.RawVideoPipeSource(System.Collections.Generic.IEnumerator)' and 'FFMpegCore.Pipes.RawVideoPipeSource.RawVideoPipeSource(System.Collections.Generic.IEnumerable)' --- FFMpegCore/FFMpeg/Pipes/RawVideoPipeSource.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/FFMpegCore/FFMpeg/Pipes/RawVideoPipeSource.cs b/FFMpegCore/FFMpeg/Pipes/RawVideoPipeSource.cs index fe4c881..2f3028f 100644 --- a/FFMpegCore/FFMpeg/Pipes/RawVideoPipeSource.cs +++ b/FFMpegCore/FFMpeg/Pipes/RawVideoPipeSource.cs @@ -15,13 +15,11 @@ public class RawVideoPipeSource : IPipeSource private bool _formatInitialized; private readonly IEnumerator _framesEnumerator; - public RawVideoPipeSource(IEnumerator framesEnumerator) + public RawVideoPipeSource(IEnumerable framesEnumerator) { - _framesEnumerator = framesEnumerator; + _framesEnumerator = framesEnumerator.GetEnumerator(); } - public RawVideoPipeSource(IEnumerable framesEnumerator) : this(framesEnumerator.GetEnumerator()) { } - public string GetStreamArguments() { if (!_formatInitialized)