mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 17:09:48 +00:00
webrtc_sendrecv.py: Don't try to set state on a None pipe
``` ERROR peer '5762' not found Traceback (most recent call last): File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 190, in <module> res = loop.run_until_complete(c.loop()) File "/usr/lib64/python3.10/asyncio/base_events.py", line 641, in run_until_complete return future.result() File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 155, in loop self.close_pipeline() File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 142, in close_pipeline self.pipe.set_state(Gst.State.NULL) AttributeError: 'NoneType' object has no attribute 'set_state' ``` Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1832>
This commit is contained in:
parent
4a36e32ff2
commit
4008e6d741
1 changed files with 3 additions and 2 deletions
|
@ -138,8 +138,9 @@ class WebRTCClient:
|
|||
self.webrtc.emit('add-ice-candidate', sdpmlineindex, candidate)
|
||||
|
||||
def close_pipeline(self):
|
||||
self.pipe.set_state(Gst.State.NULL)
|
||||
self.pipe = None
|
||||
if self.pipe:
|
||||
self.pipe.set_state(Gst.State.NULL)
|
||||
self.pipe = None
|
||||
self.webrtc = None
|
||||
|
||||
async def loop(self):
|
||||
|
|
Loading…
Reference in a new issue