diff --git a/src/MMALSharp/Components/MMALIspComponent.cs b/src/MMALSharp/Components/MMALIspComponent.cs index 1ca7d1dd..a215842e 100644 --- a/src/MMALSharp/Components/MMALIspComponent.cs +++ b/src/MMALSharp/Components/MMALIspComponent.cs @@ -33,7 +33,11 @@ public unsafe MMALIspComponent() { // Default to use still image port behaviour. this.Inputs.Add(new InputPort((IntPtr)(&(*this.Ptr->Input[0])), this, Guid.NewGuid())); - this.Outputs.Add(new StillPort((IntPtr)(&(*this.Ptr->Output[0])), this, Guid.NewGuid())); + + for (var i = 0; i < this.Ptr->OutputNum; i++) + { + this.Outputs.Add(new StillPort((IntPtr)(&(*this.Ptr->Output[i])), this, Guid.NewGuid())); + } } /// @@ -45,7 +49,11 @@ public unsafe MMALIspComponent(Type outputPortType) : base(MMAL_COMPONENT_ISP) { this.Inputs.Add(new InputPort((IntPtr)(&(*this.Ptr->Input[0])), this, Guid.NewGuid())); - this.Outputs.Add((IOutputPort)Activator.CreateInstance(outputPortType, (IntPtr)(&(*this.Ptr->Output[0])), this, Guid.NewGuid())); + + for (var i = 0; i < this.Ptr->OutputNum; i++) + { + this.Outputs.Add((IOutputPort)Activator.CreateInstance(outputPortType, (IntPtr)(&(*this.Ptr->Output[i])), this, Guid.NewGuid())); + } } } }