Skip to content

Commit

Permalink
fix #11
Browse files Browse the repository at this point in the history
  • Loading branch information
sdcb committed Mar 22, 2024
1 parent 3c7fe69 commit 768d176
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions src/Sdcb.FFmpeg.Tests/Common/MediaDictionaryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,15 @@ public unsafe void CanResetAfterFree()
ffmpeg.av_dict_free(&ptr);
dict.Reset(ptr);
}

[Fact]
public unsafe void ValuesTest()
{
using MediaDictionary dict = new()
{
["A1001"] = "100-One",
};
string[] values = dict.Values.ToArray();
Assert.Equal("100-One", values[0]);
}
}
2 changes: 1 addition & 1 deletion src/Sdcb.FFmpeg/Sdcb.FFmpeg.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFrameworks>net6;net48</TargetFrameworks>
<PackageId>Sdcb.FFmpeg</PackageId>
<VersionPrefix>6.1.0</VersionPrefix>
<VersionPrefix>6.1.0.1</VersionPrefix>
<LangVersion>latest</LangVersion>
<Authors>sdcb,Ruslan Balanukhin</Authors>
<Copyright>Copyright © sdcb, Ruslan Balanukhin 2022 All rights reserved.</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion src/Sdcb.FFmpeg/Utils/MediaDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static MediaDictionary FromDictionary(IDictionary<string, string> dict)
#region IDictionary<string, string> entries
public ICollection<string> Keys => this.Select(x => x.Key).ToArray();

public ICollection<string> Values => this.Select(x => x.Key).ToArray();
public ICollection<string> Values => this.Select(x => x.Value).ToArray();

public int Count => av_dict_count(this);

Expand Down

0 comments on commit 768d176

Please sign in to comment.