GNOME Bugzilla – Bug 724484
gst_element_send_event blocks when sent directly to x264enc
Last modified: 2014-11-24 17:48:27 UTC
I'm trying to remove a GstBin ( x264enc -> mp4mux -> filesink ) from the pipeline ( videotestsrc -> queue -> savebin ) from inside a blocking buffer probe callback. I send EOS to the bin on line 159 in the attached file. The ghostpad that arrives on corresponds to the x264enc sink pad. The send_eos function never returns. gdb output : http://codepad.org/TTssPnDD GST_DEBUG="*enc*:6" output : http://codepad.org/F6CByGxI
Could you provide a small test program that demonstrates the problem?
Created attachment 269317 [details] Testcase
Sorry, thought i did when i submited the bug.
You remove the bin from the pipeline, but then wait for the EOS message from the now-removed filesink on the pipeline bus. That's not going to happen if the element is not inside the pipeline. Not sure why you set sync=true on filesink. But I think you want to set async=FALSE instead.
Thanks for pointing that out. I tried making a much more simplified testcase ( i removed the pad probe and send EOS from a timeout callback, i had the same behaviour ). Then i tried simplifying it even further and didn't send EOS at all, just let the pipeline be with the savebin. It hangs in the same way without me sending anything or blocking anything. My guess is that there is something wrong with the savebin but I don't see it.. hopefully someone else will. http://codepad.org/k6dXgbWu
Yes, that's because you have an unlinked fakesink in the pipeline (and an unlinked x264enc). Not sure what you expect. The gstreamer-devel list might be a better place to get help debugging such issues. Also, please attach sample code as attachment to the bug in future, thanks!