Use the h264_nvmpi hardware decoder to decode H264 experiences a memory leak

Hi,
On Jetson platforms, we have h264_nvv4l2dec in ffmpeg. Please refer to developer guide and the forum posts:
Accelerated Decode with ffmpeg — NVIDIA Jetson Linux Developer Guide
Jetson AGX Orin FAQ
Ffmpeg failed to decode with h264_nvv4l2dec, Segmentation fault! - #6 by DaneLLL