Skip to content

Commit

Permalink
Fixes FfmpegDecoder AccessViolationException on 32 bit systems
Browse files Browse the repository at this point in the history
  • Loading branch information
raphgodart committed Mar 25, 2018
1 parent 7067a75 commit 8e269f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CSCore.Ffmpeg/FfmpegCalls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ public enum SeekFlags
SeekForce = 0x20000
}

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate int AvioReadData(IntPtr opaque, IntPtr buffer, int bufferSize);

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate int AvioWriteData(IntPtr opaque, IntPtr buffer, int bufferSize);

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate long AvioSeek(IntPtr opaque, long offset, SeekFlags whence);

static FfmpegCalls()
Expand Down
1 change: 1 addition & 0 deletions CSCore.Ffmpeg/FfmpegLogReceivedEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public class FfmpegLogReceivedEventArgs : EventArgs
/// </value>
public string ParentLogContextItemName { get; set; }

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate IntPtr ItemNameFunc(IntPtr avClass);

internal unsafe FfmpegLogReceivedEventArgs(AVClass? avClass, AVClass? parentLogContext, LogLevel level, string line, void* ptr, void* ptr1)
Expand Down

0 comments on commit 8e269f5

Please sign in to comment.