summaryrefslogtreecommitdiffstats
path: root/stream/realrtsp/real.c
diff options
context:
space:
mode:
authorrtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-04-09 20:06:45 +0000
committerrtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-04-09 20:06:45 +0000
commitb3b2404893b15522d7ce5564be8d06da088c3b10 (patch)
treec625ae66425b7658827399a37791a14f8aac1734 /stream/realrtsp/real.c
parent839c996198ef0571375a99d12352cab675725113 (diff)
downloadmpv-b3b2404893b15522d7ce5564be8d06da088c3b10.tar.bz2
mpv-b3b2404893b15522d7ce5564be8d06da088c3b10.tar.xz
Size of response is known, no need to calculate it
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22959 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/realrtsp/real.c')
-rw-r--r--stream/realrtsp/real.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/stream/realrtsp/real.c b/stream/realrtsp/real.c
index 7cbf8bf337..ca03287a63 100644
--- a/stream/realrtsp/real.c
+++ b/stream/realrtsp/real.c
@@ -105,7 +105,7 @@ static void calc_response_string (char *result, char *challenge) {
static void real_calc_response_and_checksum (char *response, char *chksum, char *challenge) {
- int ch_len, resp_len;
+ int ch_len;
int i;
char *ptr;
char buf[128];
@@ -145,11 +145,10 @@ static void real_calc_response_and_checksum (char *response, char *chksum, char
calc_response_string (response, buf);
/* add tail */
- resp_len = strlen (response);
- strcpy (&response[resp_len], "01d0a8e3");
+ strcpy (&response[32], "01d0a8e3");
/* calculate checksum */
- for (i=0; i<resp_len/4; i++)
+ for (i=0; i<8; i++)
chksum[i] = response[i*4];
}