webrtc_sendrecv.py: Don't try to set state on a None pipe
authorNirbheek Chauhan <nirbheek@centricular.com>
Tue, 1 Mar 2022 14:27:06 +0000 (19:57 +0530)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 1 Mar 2022 16:33:28 +0000 (16:33 +0000)
commite9a02a7380687a84a901c140a23700687740d5d8
tree10dfe82269f068e76192ddecd00fe2d62a45d39f
parent78f8505b9aebfef5a28c75be01e0a610a873a459
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/1821>
subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py