Unknown SDP type in python bindings (maybe memory corruption)
Webrtcbin on create-answer returns WebRTCSessionDescription with unknown WebRTCSDPType (enum value varies at each run) and empty SDP when used as
answer = promise.get_reply().get_value("answer")
Though all right if split this to two lines
reply = promise.get_reply()
answer = reply.get_value("answer")
Full script is here: https://gist.github.com/le-chat/f0aa4222b5a978446ce937ac59341ba8#file-test-py
And logs are in https://gist.github.com/le-chat/f0aa4222b5a978446ce937ac59341ba8#file-log-txt
Tested on Ubuntu 22.04 (gstreamer 1.20.1, python 3.10) and NixOS 22.05 (gstreamer 1.20.1, python 3.9).
Expected behaviour: get WebRTCSessionDescription with WebRTCSDPType=ANSWER and some SDP.
Observed behaviour: got WebRTCSessionDescription with WebRTCSDPType=unknown random-looking integer and sdp=None.
To reproduce with Nix:
git clone https://gist.github.com/f0aa4222b5a978446ce937ac59341ba8.git gst-python-bug-report
cd gst-python-bug-report
nix-shell --run "python test.py"
Thanks to Matthew Waters who guess the workaround in https://lists.freedesktop.org/archives/gstreamer-devel/2022-July/080197.html