diff options
author | Claudio Ciccani <klan@users.sourceforge.net> | 2006-12-22 18:08:10 +0000 |
---|---|---|
committer | Claudio Ciccani <klan@users.sourceforge.net> | 2006-12-22 18:08:10 +0000 |
commit | e3d7457a7cd9555e1f8a618ecad38e3f565e614e (patch) | |
tree | 6926249c2bcb08fd22757f8a2440deb1201b4f8d | |
parent | 3d56d04596432b38df459892f39105722d49aa56 (diff) | |
download | xine-lib-e3d7457a7cd9555e1f8a618ecad38e3f565e614e.tar.gz xine-lib-e3d7457a7cd9555e1f8a618ecad38e3f565e614e.tar.bz2 |
In rtsp_session_read(): return the actual amount of bytes read.
CVS patchset: 8435
CVS date: 2006/12/22 18:08:10
-rw-r--r-- | src/input/librtsp/rtsp_session.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/input/librtsp/rtsp_session.c b/src/input/librtsp/rtsp_session.c index 1b19421c3..66de10584 100644 --- a/src/input/librtsp/rtsp_session.c +++ b/src/input/librtsp/rtsp_session.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: rtsp_session.c,v 1.18 2006/12/22 16:42:20 klan Exp $ + * $Id: rtsp_session.c,v 1.19 2006/12/22 18:08:10 klan Exp $ * * high level interface to rtsp servers. */ @@ -189,7 +189,7 @@ static void rtsp_session_play (rtsp_session_t *this) { int rtsp_session_read (rtsp_session_t *this, char *data, int len) { - int to_copy=len; + int to_copy; char *dest=data; char *source=this->recv + this->recv_read; int fill=this->recv_size - this->recv_read; @@ -198,12 +198,13 @@ int rtsp_session_read (rtsp_session_t *this, char *data, int len) { return 0; if (this->header_left) { - if (to_copy > this->header_left) - to_copy = this->header_left; + if (len > this->header_left) + len = this->header_left; - this->header_left -= to_copy; + this->header_left -= len; } + to_copy = len; while (to_copy > fill) { if (!this->playing) { |