This isn't an OBS problem but rather the developers of x264 based on the call stack. OBS doesn't call libx264 in the thread that called to produce this crash.
I've seen two cases of this same crash reported on this forum. Yours is the third case reported.
https://obsproject.com/forum/threads/randomly-crashes-libx264-148-dll.81048/
https://obsproject.com/forum/threads/two-crashes-one-night.81182/
Similar reports show a c0000005 unhandled exception after a libx264 call.
Thread 3134 (Crashed)
Stack EIP Arg0 Arg1 Arg2 Arg3 Address
0000006981F2F000 00007FFE5BF636D2 00000196C1384300 0000006981F2FB60 0000006981F2FA10
0000000000000004 libx264-148.dll!0x7ffe5bf636d2
-- snip --
Common pattern is:
1) It is AMD Ryzen CPU related
2) The last argument, Arg3 is set to 4 (could be var arg call).
If it is happening once in a blue moon, just ignore it. There's not much that can be done if its not always reproducible. Even if it is, a certain set of conditions, possibly low level hardware related, is in play. I'd recommend that since this is Ryzen, to avoid overclocking, always update your system BIOS and make 100% sure your memory chips are on the AMD and motherboard QVL list. Failure to follow this is on you.
If it is happening a lot and many people are getting this crash (not only in OBS but in other apps as well), you'll have to wait for the x264 dev team to provide a fix. Given that this library isn't frequently updated, don't expect a fix anytime soon, if ever.