summaryrefslogtreecommitdiff
path: root/src/input/libreal
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/libreal')
-rw-r--r--src/input/libreal/.hgignore (renamed from src/input/libreal/.cvsignore)0
-rw-r--r--src/input/libreal/asmrp.c6
-rw-r--r--src/input/libreal/real.c21
-rw-r--r--src/input/libreal/sdpplin.c57
4 files changed, 48 insertions, 36 deletions
diff --git a/src/input/libreal/.cvsignore b/src/input/libreal/.hgignore
index 7d926a554..7d926a554 100644
--- a/src/input/libreal/.cvsignore
+++ b/src/input/libreal/.hgignore
diff --git a/src/input/libreal/asmrp.c b/src/input/libreal/asmrp.c
index 5fd5ae798..8afc19df6 100644
--- a/src/input/libreal/asmrp.c
+++ b/src/input/libreal/asmrp.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: asmrp.c,v 1.9 2006/11/29 19:43:01 dgp85 Exp $
+ * $Id: asmrp.c,v 1.10 2006/12/25 15:39:31 dgp85 Exp $
*
* a parser for real's asm rules
*
@@ -417,7 +417,9 @@ static int asmrp_operand (asmrp_t *p) {
i = asmrp_find_id (p, p->str);
if (i<0) {
- lprintf ("error: unknown identifier %s\n", p->str);
+ printf ("error: unknown identifier %s\n", p->str);
+ ret = 0;
+ break;
}
ret = p->sym_tab[i].v;
diff --git a/src/input/libreal/real.c b/src/input/libreal/real.c
index 270fd16e4..dc0c001bd 100644
--- a/src/input/libreal/real.c
+++ b/src/input/libreal/real.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: real.c,v 1.24 2006/11/29 19:43:01 dgp85 Exp $
+ * $Id: real.c,v 1.26 2007/01/19 01:19:06 dgp85 Exp $
*
* special functions for real streams.
* adopted from joschkas real tools.
@@ -289,18 +289,15 @@ static void calc_response (char *result, char *field) {
static void calc_response_string (char *result, char *challenge) {
- char field[128];
+ char field[128] = {
+ 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
+ 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
char zres[20];
int i;
- /* initialize our field */
- BE_32C (field, 0x01234567);
- BE_32C ((field+4), 0x89ABCDEF);
- BE_32C ((field+8), 0xFEDCBA98);
- BE_32C ((field+12), 0x76543210);
- BE_32C ((field+16), 0x00000000);
- BE_32C ((field+20), 0x00000000);
-
/* calculate response */
call_hash(field, challenge, 64);
calc_response(zres,field);
@@ -715,10 +712,6 @@ rmff_header_t *real_setup_and_get_header(rtsp_t *rtsp_session, uint32_t bandwid
rtsp_schedule_field(rtsp_session, subscribe);
rtsp_request_setparameter(rtsp_session,NULL);
- /* and finally send a play request */
- rtsp_schedule_field(rtsp_session, "Range: npt=0-");
- rtsp_request_play(rtsp_session,NULL);
-
xine_buffer_free(subscribe);
xine_buffer_free(buf);
return h;
diff --git a/src/input/libreal/sdpplin.c b/src/input/libreal/sdpplin.c
index e77781253..019237243 100644
--- a/src/input/libreal/sdpplin.c
+++ b/src/input/libreal/sdpplin.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: sdpplin.c,v 1.6 2006/06/20 01:07:58 dgp85 Exp $
+ * $Id: sdpplin.c,v 1.8 2006/12/25 16:21:56 dgp85 Exp $
*
* sdp/sdpplin parser.
*
@@ -71,8 +71,9 @@ static char *b64_decode(const char *in, char *out, int *size)
int c = in[i+j];
if (dtable[c] & 0x80) {
- printf("Illegal character '%c' in input.\n", c);
- exit(1);
+ fprintf(stderr, "Illegal character '%c' in input.\n", c);
+ *size = 0;
+ return NULL;
}
a[i] = (char) c;
b[i] = (char) dtable[c];
@@ -200,11 +201,13 @@ static sdpplin_stream_t *sdpplin_parse_stream(char **data) {
if(filter(*data,"a=OpaqueData:buffer;",&buf)) {
decoded = b64_decode(buf, decoded, &(desc->mlti_data_size));
- desc->mlti_data = malloc(sizeof(char)*desc->mlti_data_size);
- memcpy(desc->mlti_data, decoded, desc->mlti_data_size);
- handled=1;
- *data=nl(*data);
- lprintf("mlti_data_size: %i\n", desc->mlti_data_size);
+ if ( decoded != NULL ) {
+ desc->mlti_data = malloc(sizeof(char)*desc->mlti_data_size);
+ memcpy(desc->mlti_data, decoded, desc->mlti_data_size);
+ handled=1;
+ *data=nl(*data);
+ lprintf("mlti_data_size: %i\n", desc->mlti_data_size);
+ }
}
if(filter(*data,"a=ASMRuleBook:string;",&buf)) {
@@ -239,11 +242,17 @@ sdpplin_t *sdpplin_parse(char *data) {
int handled;
int len;
+ desc->stream = NULL;
+
while (data && *data) {
handled=0;
if (filter(data, "m=", &buf)) {
+ if ( ! desc->stream ) {
+ fprintf(stderr, "sdpplin.c: stream identifier found before stream count, skipping.");
+ continue;
+ }
stream=sdpplin_parse_stream(&data);
lprintf("got data for stream id %u\n", stream->stream_id);
desc->stream[stream->stream_id]=stream;
@@ -252,30 +261,38 @@ sdpplin_t *sdpplin_parse(char *data) {
if(filter(data,"a=Title:buffer;",&buf)) {
decoded=b64_decode(buf, decoded, &len);
- desc->title=strdup(decoded);
- handled=1;
- data=nl(data);
+ if ( decoded != NULL ) {
+ desc->title=strdup(decoded);
+ handled=1;
+ data=nl(data);
+ }
}
if(filter(data,"a=Author:buffer;",&buf)) {
decoded=b64_decode(buf, decoded, &len);
- desc->author=strdup(decoded);
- handled=1;
- data=nl(data);
+ if ( decoded != NULL ) {
+ desc->author=strdup(decoded);
+ handled=1;
+ data=nl(data);
+ }
}
if(filter(data,"a=Copyright:buffer;",&buf)) {
decoded=b64_decode(buf, decoded, &len);
- desc->copyright=strdup(decoded);
- handled=1;
- data=nl(data);
+ if ( decoded != NULL ) {
+ desc->copyright=strdup(decoded);
+ handled=1;
+ data=nl(data);
+ }
}
if(filter(data,"a=Abstract:buffer;",&buf)) {
decoded=b64_decode(buf, decoded, &len);
- desc->abstract=strdup(decoded);
- handled=1;
- data=nl(data);
+ if ( decoded != NULL ) {
+ desc->abstract=strdup(decoded);
+ handled=1;
+ data=nl(data);
+ }
}
if(filter(data,"a=StreamCount:integer;",&buf)) {