[rtmpdump] r396 - in trunk/librtmp: parseurl.c rtmp.c
hyc
subversion at mplayerhq.hu
Wed Mar 24 19:43:31 CET 2010
Author: hyc
Date: Wed Mar 24 19:43:30 2010
New Revision: 396
Log:
Fix buffer errors
Modified:
trunk/librtmp/parseurl.c
trunk/librtmp/rtmp.c
Modified: trunk/librtmp/parseurl.c
==============================================================================
--- trunk/librtmp/parseurl.c Tue Mar 23 02:14:13 2010 (r395)
+++ trunk/librtmp/parseurl.c Wed Mar 24 19:43:30 2010 (r396)
@@ -142,7 +142,7 @@ parsehost:
slash3 = strchr(slash2+1, '/');
applen = end-p; // ondemand, pass all parameters as app
- appnamelen = 8; // ondemand length
+ appnamelen = applen; // ondemand length
if(ques && strstr(p, "slist=")) { // whatever it is, the '?' and slist= means we need to use everything as app and parse plapath from slist=
appnamelen = ques-p;
@@ -170,9 +170,9 @@ parsehost:
if (*p == '/')
p++;
- {
- AVal av = {p, end-p};
- RTMP_ParsePlaypath(&av, playpath);
+ if (end-p) {
+ AVal av = {p, end-p};
+ RTMP_ParsePlaypath(&av, playpath);
}
return true;
Modified: trunk/librtmp/rtmp.c
==============================================================================
--- trunk/librtmp/rtmp.c Tue Mar 23 02:14:13 2010 (r395)
+++ trunk/librtmp/rtmp.c Wed Mar 24 19:43:30 2010 (r396)
@@ -3568,6 +3568,8 @@ RTMP_Read(RTMP *r, char *buf, int size)
}
r->m_read.buf += nRead;
r->m_read.buflen -= nRead;
+ if (r->m_read.dataType == 5)
+ break;
}
mybuf[4] = r->m_read.dataType;
r->m_read.buflen = r->m_read.buf - mybuf;
More information about the rtmpdump
mailing list