Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nativesrc/aurioffmpegproxy/proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ static void pi_free(ProxyInstance **pi) {
static void pi_set_error(ProxyInstance *pi, const char* fmt, ...)
{
va_list args;
int error_message_length = 100;
int error_message_length = 500;
char *error_message = malloc(error_message_length);

// Print the string with the argument list into the error message char array
Expand Down
8 changes: 8 additions & 0 deletions src/Aurio.FFmpeg.UnitTest/FFmpegReaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,13 @@ public void SignalEOF()
// -1 signals EOF
Assert.Equal(-1, result);
}

[Fact]
public void Utf8FileName()
{
var fileInfo = new FileInfo("./Resources/utf8 special ° character.wav");

var reader = new FFmpegReader(fileInfo, Type.Audio);
}
}
}
8 changes: 8 additions & 0 deletions src/Aurio.FFmpeg.UnitTest/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"profiles": {
"Aurio.FFmpeg.UnitTest": {
"commandName": "Project",
"nativeDebugging": true
}
}
}
Binary file not shown.
3 changes: 3 additions & 0 deletions src/Aurio.FFmpeg/Aurio.FFmpeg.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackagePath>runtimes/win-x64/native</PackagePath>
</Content>
<Content Include="$(FFmpegProxyWindowsPath)\aurioffmpegproxy.pdb" Condition="$(Configuration.Contains('Debug'))">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup Condition="$(Configuration.Contains('Linux')) Or $(Configuration.Contains('NugetPack'))">
<Content Include="$(FFmpegProxyLinuxPath)\libaurioffmpegproxy.so">
Expand Down
2 changes: 1 addition & 1 deletion src/Aurio.FFmpeg/FFmpegReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ private void CheckAndHandleOpeningError()
{
if (InteropWrapper.stream_has_error(instance))
{
string errorMessage = Marshal.PtrToStringAnsi(
string errorMessage = Marshal.PtrToStringUTF8(
InteropWrapper.stream_get_error(instance)
);
throw new IOException("Error opening the FFmpeg stream: " + errorMessage);
Expand Down
7 changes: 5 additions & 2 deletions src/Aurio.FFmpeg/Interop64.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@ internal class Interop64
private const string FFMPEGPROXYLIB = "aurioffmpegproxy";

[DllImport(FFMPEGPROXYLIB, CallingConvention = InteropWrapper.CC)]
public static extern IntPtr stream_open_file(Type mode, string filename);
public static extern IntPtr stream_open_file(
Type mode,
[MarshalAs(UnmanagedType.LPUTF8Str)] string filename
);

[DllImport(FFMPEGPROXYLIB, CallingConvention = InteropWrapper.CC)]
public static extern IntPtr stream_open_bufferedio(
Type mode,
IntPtr opaque,
InteropWrapper.CallbackDelegateReadPacket readPacket,
InteropWrapper.CallbackDelegateSeek seek,
string filename
[MarshalAs(UnmanagedType.LPUTF8Str)] string filename
);

[DllImport(FFMPEGPROXYLIB, CallingConvention = InteropWrapper.CC)]
Expand Down
2 changes: 1 addition & 1 deletion src/Aurio/Aurio.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ overlap-adding (OLA/COLA), fingerprinting, and WPF UI controls for visualization
<PackageReference Include="NAudio.Core" Version="2.2.1" />
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="cp &quot;$(ProjectDir)/../../NOTICE&quot; &quot;$(ProjectDir)/licenseinfo.txt&quot;" />
<Copy SourceFiles="$(ProjectDir)..\..\NOTICE" DestinationFiles="$(ProjectDir)licenseinfo.txt" />
<ItemGroup>
<None Include="./README.nuget.md" Pack="true" PackagePath="/README.md" />
</ItemGroup>
Expand Down
Loading