gst_bin_get_by_name() increases the refcount to your appsink. After you set your appsink callbacks/signals you should also gst_object_unref() this object again. This increased refcount probably causes your pipeline to not be released correctly as the appsink is not released. Cheers, Florian