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
If ffmpeg.avformat_alloc_context() encounters an error, ffmpeg frees the context. The next line then assigns the freed context to _formatContext. Then ffmpeg.avformat_open_input() returns an error, calling Dispose(), which then tries to free the already freed context, resulting in a crash. Delaying the _formatContext assignment until after FFMpegHelper.Verify() fixes this because Dispose() will not try to free _formatContext.
If
ffmpeg.avformat_alloc_context()
encounters an error, ffmpeg frees the context. The next line then assigns the freed context to_formatContext
. Thenffmpeg.avformat_open_input()
returns an error, callingDispose()
, which then tries to free the already freed context, resulting in a crash. Delaying the_formatContext
assignment until afterFFMpegHelper.Verify()
fixes this becauseDispose()
will not try to free_formatContext
.DecodeContext()
MonoGame.Extended2/Sources/MonoGame.Extended.VideoPlayback/DecodeContext.cs
Lines 35 to 37 in a20100b
Dispose()
MonoGame.Extended2/Sources/MonoGame.Extended.VideoPlayback/DecodeContext.cs
Lines 697 to 701 in a20100b
avformat_alloc_context()
https://github.com/FFmpeg/FFmpeg/blob/00b288da73f45acb78b74bcc40f73c7ba1fff7cb/libavformat/options.c#L187-L192
The text was updated successfully, but these errors were encountered: