Skip to content

Commit

Permalink
Fix ImageFramePacket.Get trying to get a handle that it doesn't own
Browse files Browse the repository at this point in the history
Signed-off-by: Ayane <ayane@vignetteapp.org>
  • Loading branch information
sr229 committed Feb 28, 2023
1 parent 7289277 commit 234fd83
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion Mediapipe.Net.Tests/Framework/Format/ImageFrameTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

using System;
using System.Linq;
using System.Runtime.InteropServices;
using Mediapipe.Net.Core;
using Mediapipe.Net.Framework.Format;
using Mediapipe.Net.Framework.Protobuf;
Expand Down
2 changes: 1 addition & 1 deletion Mediapipe.Net/Framework/Packets/ImageFramePacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public override ImageFrame Get()
UnsafeNativeMethods.mp_Packet__GetImageFrame(MpPtr, out var imageFramePtr).Assert();
GC.KeepAlive(this);

return new ImageFrame(imageFramePtr);
return new ImageFrame(imageFramePtr, false);
}

public override StatusOr<ImageFrame> Consume()
Expand Down

0 comments on commit 234fd83

Please sign in to comment.