Fix bug with WebmBuffer double-counting reads

This commit is contained in:
Tangent 128 2018-04-02 20:11:14 -04:00
parent c6ab5e8e89
commit c5a42afd32

View file

@ -34,7 +34,7 @@ impl<I: AsRef<[u8]>, S: Stream<Item = I>> WebmBuffer<S> {
return Ok(Async::NotReady); return Ok(Async::NotReady);
}, },
Ok(Some((element, element_size))) => { Ok(Some((element, element_size))) => {
self.last_read += element_size; self.last_read = element_size;
return Ok(Async::Ready(Some(element))) return Ok(Async::Ready(Some(element)))
} }
}; };