summaryrefslogtreecommitdiffstats
path: root/asfheader.c
diff options
context:
space:
mode:
authorbertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-05-18 16:14:06 +0000
committerbertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-05-18 16:14:06 +0000
commit4a83e5f2bd80b95f6acf9737462f0c3bce30423a (patch)
treeb7f8797c8b6a142ab2d2f88114dc7afe944689c4 /asfheader.c
parent8a0a08e97f23930c62c4e13ef5c371508f5051fc (diff)
downloadmpv-4a83e5f2bd80b95f6acf9737462f0c3bce30423a.tar.bz2
mpv-4a83e5f2bd80b95f6acf9737462f0c3bce30423a.tar.xz
Starting implementation of ASF network streaming.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@834 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'asfheader.c')
-rw-r--r--asfheader.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/asfheader.c b/asfheader.c
index 5ee640163c..54141fb94b 100644
--- a/asfheader.c
+++ b/asfheader.c
@@ -16,6 +16,10 @@ extern int verbose; // defined in mplayer.c
#include "codec-cfg.h"
#include "stheader.h"
+#include "asf.h"
+
+// BB: Moved to asf.h --------------------- FROM HERE -------------------
+#ifdef 0
typedef struct __attribute__((packed)) {
unsigned char guid[16];
unsigned long long size;
@@ -60,6 +64,8 @@ typedef struct __attribute__((packed)) {
unsigned short comment_size;
unsigned short rating_size;
} ASF_content_description_t;
+#endif
+// BB: Moved to asf.h --------------------- TO HERE -------------------
static ASF_header_t asfh;
static ASF_obj_header_t objh;
@@ -75,13 +81,19 @@ int asf_packetsize=0;
//int i;
-void print_asf_string(const char* name, char* string, int length){
- int i;
- printf("%s", name);
- for(i=0;i<length && string[i]!='\0';i+=2){
- printf("%c", string[i]);
+// the variable string is modify in this function
+void pack_asf_string(char* string, int length) {
+ int i,j;
+ for( i=0, j=0; i<length && string[i]!='\0'; i+=2, j++) {
+ string[j]=string[i];
}
- printf("\n");
+ string[j]='\0';
+}
+
+// the variable string is modify in this function
+void print_asf_string(const char* name, char* string, int length) {
+ pack_asf_string(string, length);
+ printf("%s%s\n", name, string);
}
static char* asf_chunk_type(unsigned char* guid){