[Mplayer-cvslog] CVS: main/libmpdemux asf_streaming.c,1.23,1.24
Bertrand Baudet
bertrand at mplayer.dev.hu
Thu Jan 24 10:30:01 CET 2002
Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv18093
Modified Files:
asf_streaming.c
Log Message:
Readded the content-type checking, in case of the no HTTP body are
sent we can still try with the content-type.
Index: asf_streaming.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/asf_streaming.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- asf_streaming.c 23 Jan 2002 14:11:19 -0000 1.23
+++ asf_streaming.c 24 Jan 2002 09:29:52 -0000 1.24
@@ -370,31 +370,32 @@
// so we could used mime type to know the stream type,
// but guess what? All of them are not well configured.
// So we have to check for an asf header :(, but it works :p
- if( asf_header_check( http_hdr )==0 ) {
- printf("=====> ASF Plain text\n");
- return ASF_PlainText_e;
+ if( http_hdr->body_size>sizeof(ASF_obj_header_t) ) {
+ if( asf_header_check( http_hdr )==0 ) {
+ printf("=====> ASF Plain text\n");
+ return ASF_PlainText_e;
+ } else {
+ printf("=====> ASF Redirector\n");
+ return ASF_Redirector_e;
+ }
} else {
- printf("=====> ASF Redirector\n");
- return ASF_Redirector_e;
+ if( (!strcasecmp(content_type, "audio/x-ms-wax")) ||
+ (!strcasecmp(content_type, "audio/x-ms-wma")) ||
+ (!strcasecmp(content_type, "video/x-ms-asf")) ||
+ (!strcasecmp(content_type, "video/x-ms-afs")) ||
+ (!strcasecmp(content_type, "video/x-ms-wvx")) ||
+ (!strcasecmp(content_type, "video/x-ms-wmv")) ||
+ (!strcasecmp(content_type, "video/x-ms-wma")) ) {
+ printf("=====> ASF Redirector\n");
+ return ASF_Redirector_e;
+ } else if( !strcasecmp(content_type, "text/plain") ) {
+ printf("=====> ASF Plain text\n");
+ return ASF_PlainText_e;
+ } else {
+ printf("=====> ASF unknown content-type: %s\n", content_type );
+ return ASF_Unknown_e;
+ }
}
-/*
- if( (!strcasecmp(content_type, "audio/x-ms-wax")) ||
- (!strcasecmp(content_type, "audio/x-ms-wma")) ||
- (!strcasecmp(content_type, "video/x-ms-asf")) ||
- (!strcasecmp(content_type, "video/x-ms-afs")) ||
- (!strcasecmp(content_type, "video/x-ms-wvx")) ||
- (!strcasecmp(content_type, "video/x-ms-wmv")) ||
- (!strcasecmp(content_type, "video/x-ms-wma")) ) {
- printf("=====> ASF Redirector\n");
- return ASF_Redirector_e;
- } else if( !strcasecmp(content_type, "text/plain") ) {
- printf("=====> ASF Plain text\n");
- return ASF_PlainText_e;
- } else {
- printf("=====> ASF unknown content-type: %s\n", content_type );
- return ASF_Unknown_e;
- }
-*/
}
return ASF_Unknown_e;
}
More information about the MPlayer-cvslog
mailing list