Parser/demuxer will detect the end-of-file when it tries to read some data.
The question is if it is possible when parser only moves and doesnt read.
I can imagine only a very specific use of demuxer (a kind of misuse, in fact).
For example, when stream is a pure video (or audio) stream and demuxer is forced to ignore all video (or audio) tracks. Then it will be an endless loop.
Anyway I need to fix it.
Probably youfaced another use-case?