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)