diff options
Diffstat (limited to 'mkvlib')
| -rw-r--r-- | mkvlib/c/exports.go | 7 | ||||
| -rw-r--r-- | mkvlib/c/sdk.cs | 6 |
2 files changed, 2 insertions, 11 deletions
diff --git a/mkvlib/c/exports.go b/mkvlib/c/exports.go index 32c21af..b75d121 100644 --- a/mkvlib/c/exports.go +++ b/mkvlib/c/exports.go @@ -42,18 +42,13 @@ func DumpMKV(file, output *C.char, subset bool, lcb C.logCallback) bool { return getter.GetProcessorInstance().DumpMKV(gs(file), gs(output), subset, _lcb(lcb)) } -type checkSubset_R struct { - Subsetted bool `json:"subsetted"` - Error bool `json:"error"` -} - //export CheckSubset func CheckSubset(file *C.char, lcb C.logCallback) *C.char { if !checkInstance() { return cs("") } a, b := getter.GetProcessorInstance().CheckSubset(gs(file), _lcb(lcb)) - data, _ := json.Marshal(checkSubset_R{a, b}) + data, _ := json.Marshal([]bool{a, b}) return cs(string(data)) } diff --git a/mkvlib/c/sdk.cs b/mkvlib/c/sdk.cs index d174357..9913a1a 100644 --- a/mkvlib/c/sdk.cs +++ b/mkvlib/c/sdk.cs @@ -103,11 +103,7 @@ public static class mkvlib public static bool[] CheckSubset(string file, Action<string> lcb) { string json = css(CheckSubset(cs(file), _lcb(lcb))); - JsonDocument doc = JsonDocument.Parse(json); - bool[] result = new bool[2]; - result[0] = doc.RootElement.GetProperty("subsetted").GetBoolean(); - result[1] = doc.RootElement.GetProperty("error").GetBoolean(); - return result; + return JsonSerializer.Deserialize<bool[]>(json); } public static bool CreateMKV(string file, string[] tracks, string[] attachments, string output, string slang, string stitle, bool clean) |
