Use reference counting for active nvenc instances.
Avoid Mem Leak detected