multifilesink generates several small unviewable files when stream recovers after being down
I am streaming a sample TS file (from https://tsduck.io/streams/?name=brazil-isdb-tb) with the following pipeline:
gst-launch-1.0 multifilesrc location=/home/scientia/Videos/TS1globo.ts ! tsparse alignment=7 set-timestamps=true ! udpsink host=18.104.22.168 port=16400
I then record the outgoing UDP stream to files using multifilesink:
gst-launch-1.0 udpsrc address=22.214.171.124 port=16400 ! multifilesink location=segment_%d.ts next-file=2
The multifilesink generates files as expected, separating them by the closest keyframe to a 10-second duration for each file. However, if I terminate the first pipeline, wait several minutes, and restart it, multifilesink will generate several small files, each of size ~1.3K approximately, and then continue recording files starting at the next available index. It seems that for every 10 seconds the UDP stream is down, multifilesink generates one additional small file. These files are unviewable and create issues with playback using multifilesrc.
Please advise as to what may be the issue here. Thank you.