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
Throw error - System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
The text was updated successfully, but these errors were encountered:
public class FrameDecoder : IFrameDecoder
{
private readonly static ThreadLocal H264 = new (() => FFmpegVideoDecoder.CreateDecoder(FFmpegVideoCodecId.H264));
private readonly static ThreadLocal MJPEG = new (() => FFmpegVideoDecoder.CreateDecoder(FFmpegVideoCodecId.MJPEG));
public FFmpegVideoDecoder GetDecoderForFrame(RawVideoFrame videoFrame)
{
if (videoFrame is RawJpegFrame)
return MJPEG.Value;
if (videoFrame is RawH264Frame)
return H264.Value;
return null;
}
public IDecodedVideoFrame TryDecode(RawVideoFrame rawVideoFrame)
{
var decoder = GetDecoderForFrame(rawVideoFrame);
return decoder.TryDecode(rawVideoFrame);
}
Throw error - System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
The text was updated successfully, but these errors were encountered: