diff --git a/media/rw.go b/media/rw.go index f66509ddf..544a4eb40 100644 --- a/media/rw.go +++ b/media/rw.go @@ -88,8 +88,11 @@ func (mw *MediaWriter) MakeReader() CloneableReader { func (mr *MediaReader) Read(p []byte) (int, error) { data, eof := mr.source.readData(mr.readPos) toRead := len(p) - if len(data) < toRead { + if len(data) <= toRead { toRead = len(data) + } else { + // there is more data to read + eof = false } copy(p, data[:toRead])