[FFmpeg-user] Ryujinx FFMpeg crash upon decoding h264

Dennis Mungai dmngaie at gmail.com
Tue Oct 19 09:38:27 EEST 2021


On Tue, 19 Oct 2021 at 09:10, Auron Hines <ghostslayer989 at outlook.com>
wrote:

> When any game requests for h264 decoding, we use ffmpeg for this, however,
> AMD users seem to be getting an error upon decoding.
>
> Ryujinx.NvdecProcessor Application : Unhandled exception caught:
> System.ArgumentNullException: Value cannot be null. (Parameter 'ptr')
>    at
> System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(IntPtr
> ptr, Type t)
>    at
> System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer[TDelegate](IntPtr
> ptr)
>    at Ryujinx.Graphics.Nvdec.FFmpeg.FFmpegContext..ctor(AVCodecID codecId)
>    at Ryujinx.Graphics.Nvdec.FFmpeg.H264.Decoder..ctor()
>    at Ryujinx.Graphics.Nvdec.NvdecDecoderContext.GetH264Decoder()
>    at Ryujinx.Graphics.Nvdec.H264Decoder.Decode(NvdecDecoderContext
> context, ResourceManager rm, NvdecRegisters& state)
>    at Ryujinx.Graphics.Nvdec.NvdecDevice.Decode(CodecId codecId)
>    at Ryujinx.Common.AsyncWorkQueue`1.DoWork()
>    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
>    at System.Threading.ExecutionContext.RunInternal(ExecutionContext
> executionContext, ContextCallback callback, Object state)
> --- End of stack trace from previous location ---
>    at System.Threading.ExecutionContext.RunInternal(ExecutionContext
> executionContext, ContextCallback callback, Object state)
>    at System.Threading.ThreadHelper.ThreadStart()
>
> Code with error:
> https://github.com/Ryujinx/Ryujinx/blob/master/Ryujinx.Graphics.Nvdec.FFmpeg/FFmpegContext.cs#L27
> [
> https://opengraph.githubassets.com/fa03eb0f8870608392d3c7c7742748921a08c9159e27c3086c4f28a47c9a7c57/Ryujinx/Ryujinx
> ]<
> https://github.com/Ryujinx/Ryujinx/blob/master/Ryujinx.Graphics.Nvdec.FFmpeg/FFmpegContext.cs#L27
> >
> Ryujinx/FFmpegContext.cs at master · Ryujinx/Ryujinx<
> https://github.com/Ryujinx/Ryujinx/blob/master/Ryujinx.Graphics.Nvdec.FFmpeg/FFmpegContext.cs#L27
> >
> Experimental Nintendo Switch Emulator written in C# -
> Ryujinx/FFmpegContext.cs at master · Ryujinx/Ryujinx
> github.com
> System info: https://pastebin.com/jYFBSt0F
>
>
>
And why are you using NVDEC on an AMD GPU for hwaccel decode?


More information about the ffmpeg-user mailing list