Hanging in shmsink
Sometimes producer pipeline with shmsink hanging. That happens if consumer (shmsrc) not pull data (sleep) for some time. So shmsink allocate all acceptable blocks in shared memory and start waiting for free blocks, but it never happens, because shmsink can't allocate new memory and blocks of shared memory (as GstBuffer-s) reuses by gstreamer. So producer freezes here:
I see this problem with gstreamer version 1.4 and 1.6
Looks like if we will ignore "need_new_memory" condition (just return from function and skip current frame) it fixes the problem. Here you can find minimal example for bug reproducing and small fix that resolves the problem.