GNOME Bugzilla – Bug 796552
playbin: deadlock when getting current visualization while playsink is configuring the video chain
Last modified: 2018-11-03 12:07:51 UTC
In my application I would like to enable audio visualization at startup when playing an audio file. So far, I haven't found a better way than handling this in my media-info-updated signal handler. If the info has no video track I check if a visualization was previously set and if it's not the case, set it. So the visualization is correctly set and playsink starts to create a video chain (thread 20) but the player emits another media-info-updated signal (tags update) and then the main thread deadlocks because playsink is already locked in thread 20. Am I doing this wrong in my application? (gdb) t a a bt
+ Trace 238637
Thread 1 (Thread 0x7f6c98f02d00 (LWP 6289))
Classic deadlock between gtkglsink wanting to run something on the main loop and waiting for the result from the streaming thread (going through playsink's gst_play_sink_do_reconfigure() which has the playsink lock!), and the main loop thread wanting to take the playsink lock. Needs some lock refactoring in playsink, or gtkglsink not waiting synchronously for the execution in the main loop (which probably is not possible, didn't check the code).
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/459.