Deadlock on setting queue to NULL state in PAUSED pipeline

Andrey Utkin andrey.krieger.utkin at gmail.com
Fri Dec 27 13:13:58 PST 2013


I have solved the issue. I'll describe it for those who are interested.
You can check it in "fix" branch of my repo with sketch app, which i
have mentioned before:
https://github.com/krieger-od/gstreamer_test/tree/fix, especially last
commit.
I used GST_PAD_PROBE_TYPE_BLOCK instead of
GST_PAD_PROBE_TYPE_BLOCKING, avoiding synchronous call and getting
consistent behaviour - the callback may be called only from one
thread, the thread pushing through the subject pad (i hope i don't
mess up with terms).
So now release_request_pad is executed from queue push thread, and we
cannot set its state to NULL in place, so we use another asynchronous
callback which works through GMainContext, see in bottom of src_bin.c.
If you use default GMainContext, you can go with just g_idle_add()
which is advised by warning message (which appears when you try to set
queue element to NULL from its pushing thread).

-- 
Andrey Utkin


More information about the gstreamer-devel mailing list