summaryrefslogtreecommitdiff
path: root/src/input/libreal
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/libreal')
-rw-r--r--src/input/libreal/real.c26
-rw-r--r--src/input/libreal/rmff.c8
-rw-r--r--src/input/libreal/sdpplin.c9
3 files changed, 19 insertions, 24 deletions
diff --git a/src/input/libreal/real.c b/src/input/libreal/real.c
index 6ce9e132d..f95b754a7 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.22 2006/03/18 09:35:03 tmattern Exp $
+ * $Id: real.c,v 1.23 2006/06/20 01:07:58 dgp85 Exp $
*
* special functions for real streams.
* adopted from joschkas real tools.
@@ -40,7 +40,8 @@
#include "xineutils.h"
#include "bswap.h"
-const unsigned char xor_table[] = {
+#define XOR_TABLE_LEN 37
+static const unsigned char xor_table[] = {
0x05, 0x18, 0x74, 0xd0, 0x0d, 0x09, 0x02, 0x53,
0xc0, 0x01, 0x05, 0x05, 0x67, 0x03, 0x19, 0x70,
0x08, 0x27, 0x66, 0x10, 0x10, 0x72, 0x08, 0x09,
@@ -215,9 +216,9 @@ static void hash(char *field, char *param) {
LE_32C(field+12, d);
}
-static void call_hash (char *key, char *challenge, int len) {
+static void call_hash (char *key, char *challenge, unsigned int len) {
- uint8_t *ptr1, *ptr2;
+ char *ptr1, *ptr2;
uint32_t a, b, c, d, tmp;
ptr1=(key+16);
@@ -262,7 +263,7 @@ static void calc_response (char *result, char *field) {
char buf1[128];
char buf2[128];
- int i;
+ unsigned int i;
memset (buf1, 0, 64);
*buf1 = 128;
@@ -318,7 +319,7 @@ static void calc_response_string (char *result, char *challenge) {
void real_calc_response_and_checksum (char *response, char *chksum, char *challenge) {
- int ch_len, table_len, resp_len;
+ int ch_len, resp_len;
int i;
char *ptr;
char buf[128];
@@ -351,16 +352,9 @@ void real_calc_response_and_checksum (char *response, char *chksum, char *challe
memcpy(ptr, challenge, ch_len);
}
- if (xor_table != NULL)
- {
- table_len = strlen(xor_table);
-
- if (table_len > 56) table_len=56;
-
- /* xor challenge bytewise with xor_table */
- for (i=0; i<table_len; i++)
- ptr[i] = ptr[i] ^ xor_table[i];
- }
+ /* xor challenge bytewise with xor_table */
+ for (i=0; i<XOR_TABLE_LEN; i++)
+ ptr[i] = ptr[i] ^ xor_table[i];
calc_response_string (response, buf);
diff --git a/src/input/libreal/rmff.c b/src/input/libreal/rmff.c
index 4bddd6987..0c4ee2ccd 100644
--- a/src/input/libreal/rmff.c
+++ b/src/input/libreal/rmff.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: rmff.c,v 1.7 2003/12/05 15:54:58 f1rmb Exp $
+ * $Id: rmff.c,v 1.8 2006/06/20 01:07:58 dgp85 Exp $
*
* functions for real media file format
* adopted from joschkas real tools
@@ -393,7 +393,7 @@ rmff_header_t *rmff_scan_header(const char *data) {
int chunk_size;
uint32_t chunk_type;
const char *ptr=data;
- int i;
+ unsigned int i;
header->fileheader=NULL;
header->prop=NULL;
@@ -722,8 +722,8 @@ void rmff_print_header(rmff_header_t *h) {
void rmff_fix_header(rmff_header_t *h) {
- int num_headers=0;
- int header_size=0;
+ unsigned int num_headers=0;
+ unsigned int header_size=0;
rmff_mdpr_t **streams;
int num_streams=0;
diff --git a/src/input/libreal/sdpplin.c b/src/input/libreal/sdpplin.c
index 91aa133fa..e77781253 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.5 2004/04/23 21:59:04 miguelfreitas Exp $
+ * $Id: sdpplin.c,v 1.6 2006/06/20 01:07:58 dgp85 Exp $
*
* sdp/sdpplin parser.
*
@@ -41,7 +41,8 @@
static char *b64_decode(const char *in, char *out, int *size)
{
char dtable[256]; /* Encode / decode table */
- int i,j,k;
+ int i,k;
+ size_t j;
for (i = 0; i < 255; i++) {
dtable[i] = 0x80;
@@ -101,12 +102,12 @@ static char *nl(char *data) {
static int filter(const char *in, const char *filter, char **out) {
int flen=strlen(filter);
- int len;
+ size_t len;
if (!in)
return 0;
- len = (strchr(in,'\n')) ? strchr(in,'\n')-in : strlen(in);
+ len = (strchr(in,'\n')) ? (size_t)(strchr(in,'\n')-in) : strlen(in);
if (!strncmp(in,filter,flen))
{