Frame read from appsink and push it to appsrc doesn't work

Hi,
Please refer to this sample:
Starvation (?) of gstreamer threads - #12 by DaneLLL

If you see memory increase, it is very likely the functions are are called:

gst_buffer_unref(buffer);

or

gst_sample_unref (sample);