You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this amazing c# library. It works well for me overall. However, sometimes this ScaleDecodedVideoFrame method will throw the attempted to read or write protected memory exception. What went wrong here and how should I handle it? It is a very rare exception, but it did crash my program and the try catch block doesn't seem to catch it after all.
The original call is from the TransformTo(IntPtr buffer, int bufferStride, TransformParameters parameters) method in FFmpegVideoDecoder.cs
int resultCode = FFmpegVideoPInvoke.ScaleDecodedVideoFrame(_decoderHandle, videoScaler.Handle, buffer, bufferStride);
[DllImport(LibraryName, EntryPoint = "scale_decoded_video_frame", CallingConvention = CallingConvention.Cdecl)] public static extern int ScaleDecodedVideoFrame(IntPtr handle, IntPtr scalerHandle, IntPtr scaledBuffer, int scaledBufferStride);
Thank you so much for the answer!
The text was updated successfully, but these errors were encountered:
Did you find any further solution to this?
I have the same problem with the decode function. Sometimes it throws an AccessViolationException. I dont know why.
As I am developing under .net core I cannot use your solution, it might be better to fix it in the c++ library helper, but that goes beyond my knowledge...
Hello Bogdanov,
Thanks for this amazing c# library. It works well for me overall. However, sometimes this ScaleDecodedVideoFrame method will throw the attempted to read or write protected memory exception. What went wrong here and how should I handle it? It is a very rare exception, but it did crash my program and the try catch block doesn't seem to catch it after all.
The original call is from the
TransformTo(IntPtr buffer, int bufferStride, TransformParameters parameters)
method in FFmpegVideoDecoder.csint resultCode = FFmpegVideoPInvoke.ScaleDecodedVideoFrame(_decoderHandle, videoScaler.Handle, buffer, bufferStride);
[DllImport(LibraryName, EntryPoint = "scale_decoded_video_frame", CallingConvention = CallingConvention.Cdecl)]
public static extern int ScaleDecodedVideoFrame(IntPtr handle, IntPtr scalerHandle, IntPtr scaledBuffer, int scaledBufferStride);
Thank you so much for the answer!
The text was updated successfully, but these errors were encountered: