Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
6633 Discussions

Possible bug in windows-version of vm_file_fseek and vm_file_ftell

dewildt
Beginner
120 Views
Hello,
vm_file_fseek and vm_file_ftell uses SetFilePointer to seek and get the actual position in a file.

The windows documentation says:
Note that it is not an error to set the file pointer to a position beyond the end of the file. The size of the file does not increase...

So, moving to a position behind the eof without an error is possible.
When I use the FIOReader and I'm reading from a disabled stream, then the parser/demuxer will never detect the end-of-file which results in an endless loop in
Demuxer::CheckNextDataForward()

Daniel
0 Kudos
1 Reply
Intel_C_Intel
Employee
120 Views

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?

Reply