Mercurial > mplayer.hg
comparison stream/librtsp/rtsp_session.c @ 21836:7c5e893dff54
Make sure we do not crash when eof is reset, e.g. due to an attempt to seek.
author | reimar |
---|---|
date | Sun, 07 Jan 2007 19:23:59 +0000 |
parents | b8f069b793c2 |
children | f0040ff1ba40 |
comparison
equal
deleted
inserted
replaced
21835:5ee5281c78f8 | 21836:7c5e893dff54 |
---|---|
207 char *source = | 207 char *source = |
208 (char *) (this->real_session->recv + this->real_session->recv_read); | 208 (char *) (this->real_session->recv + this->real_session->recv_read); |
209 int fill = this->real_session->recv_size - this->real_session->recv_read; | 209 int fill = this->real_session->recv_size - this->real_session->recv_read; |
210 | 210 |
211 if (len < 0) return 0; | 211 if (len < 0) return 0; |
212 if (this->real_session->recv_size < 0) return -1; | |
212 while (to_copy > fill) { | 213 while (to_copy > fill) { |
213 | 214 |
214 memcpy(dest, source, fill); | 215 memcpy(dest, source, fill); |
215 to_copy -= fill; | 216 to_copy -= fill; |
216 dest += fill; | 217 dest += fill; |