From 83318d020cdde9f5271b0b7b9c4108abe57a0f2f Mon Sep 17 00:00:00 2001 From: Noethix55555 <277300782+Noethix55555@users.noreply.github.com> Date: Wed, 17 Jun 2026 19:43:23 -0400 Subject: [PATCH] fix: read 64-bit mpv INT64 properties without truncating to 32 bits --- src/MpvNet/MpvClient.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MpvNet/MpvClient.cs b/src/MpvNet/MpvClient.cs index a4890a48..01de2d71 100644 --- a/src/MpvNet/MpvClient.cs +++ b/src/MpvNet/MpvClient.cs @@ -155,7 +155,7 @@ protected virtual void OnPropertyChange(mpv_event_property data) { if (pair.Key == data.name) { - int value = Marshal.PtrToStructure(data.data); + int value = (int)Marshal.PtrToStructure(data.data); foreach (var action in pair.Value) { @@ -321,7 +321,7 @@ public int GetPropertyInt(string name) if (err < 0 && App.DebugMode) HandleError(err, "error getting property: " + name); - return lpBuffer.ToInt32(); + return (int)lpBuffer.ToInt64(); } public void SetPropertyInt(string name, int value)