gstreamer filesrc cache problem


I was encountering a problem about gstreamer.

I put the video file in a USB disk, and decode it using this pipeline:

filesrc location=/mnt/usb/demo.mp4 ! decodebin !  nvvidconv ! appsink

Everything works well.

But after the USB disk is removed, the pipeline is still working. And even after I relaunch the pipeline, it STILL working.

I guess there is some cache of filesrc.

How can I delete the cache or set some parameter, so that after USB disk is removed, the decode pipeline is no longer work??

Maybe below post helps:

Other users may share their experiences.