Skip to content

stream: return an error when reading/skipping too much data

Steve Lhomme requested to merge robUx4/vlc:stream_read-ssize_t into master

In release builds an assert will not be helpful.

It should be impossible to read this large amount of data in memory. But skipping a large amount of data, when seeking is not possible, could be useful.

The function cannot logically return the amount of data it read if it doesn't fit in a ssize_t. It's up to the caller to manage the extra call that would be needed to read/skip the whole amount.

vlc_stream_ReadPartial() is also used internally by vlc_stream_Read() which will behave the same.

Merge request reports

Loading