uridecodebin and souphttpsrc crash with requests module in Python script

jack_rybn jack at rybn.org
Sat Jul 8 16:01:28 UTC 2023


Hello,

I have this simple code in Python :

###########################################
import time
import requests

import gi

gi.require_version('Gst', '1.0')
from gi.repository import Gst

Gst.debug_set_active(True)
Gst.debug_set_default_threshold(3)

Gst.init(None)

gst_pipeline = Gst.parse_launch('uridecodebin 
uri=http://stream.p-node.org/billiejean.mp3 ! fakesink')
gst_pipeline.set_state(Gst.State.PLAYING)

while True:
         time.sleep(1)
###########################################

But it crashes when pipeline is set in playing state.

if i remove :
import requests

it works as expected.

However, as workaround, I can put the import after :
Gst.debug_set_active(True)

My configuration :
Ubuntu 22.04
Gstreamer 1.20.3

++

Jack

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xEBA5B9E723C3C194.asc
Type: application/pgp-keys
Size: 1688 bytes
Desc: OpenPGP public key
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230708/1fa74c80/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230708/1fa74c80/attachment.sig>


More information about the gstreamer-devel mailing list