[MPlayer-dev-eng] some funny stuff in asf_mmst_streaming.c

Jindrich Makovicka makovick at kmlinux.fjfi.cvut.cz
Mon Oct 28 21:46:03 CET 2002


Maybe something like this (hope Mozilla will show some mercy with the 
following):

diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/asf.h 
main/libmpdemux/asf.h
--- vanilla/main/libmpdemux/asf.h    2002-07-09 10:23:47.000000000 +0200
+++ main/libmpdemux/asf.h    2002-10-28 21:41:02.000000000 +0100
@@ -118,6 +118,7 @@
 
 // Definition of the differents type of ASF streaming
 typedef enum {
+    ASF_Broken_e,
     ASF_Unknown_e,
     ASF_Live_e,
     ASF_Prerecorded_e,

--- vanilla/main/libmpdemux/asf_streaming.c    2002-09-22 
20:21:09.000000000 +0200
+++ main/libmpdemux/asf_streaming.c    2002-10-28 21:40:43.000000000 +0100
@@ -549,14 +553,14 @@
     return http_hdr;
 }
 
-int
+ASF_StreamType_e
 asf_http_parse_response( HTTP_header_t *http_hdr ) {
     char *content_type, *pragma;
     char features[64] = "\0";
     int len;
     if( http_response_parse(http_hdr)<0 ) {
         mp_msg(MSGT_NETWORK,MSGL_ERR,"Failed to parse HTTP response\n");
-        return -1;
+        return ASF_Broken_e;
     }
     switch( http_hdr->status_code ) {
         case 200:
@@ -565,7 +569,7 @@
             return ASF_Authenticate_e;
         default:
             mp_msg(MSGT_NETWORK,MSGL_ERR,"Server return %d:%s\n", 
http_hdr->status_code, http_hdr->reason_phrase);
-            return -1;
+            return ASF_Broken_e;
     }
 
     content_type = http_get_field( http_hdr, "Content-Type");
@@ -671,11 +675,13 @@
             mp_msg(MSGT_NETWORK,MSGL_DBG2,"Response [%s]\n", 
http_hdr->buffer );
         }
         streaming_type = asf_http_parse_response(http_hdr);
-        if( streaming_type<0 ) {
+        if( streaming_type == ASF_Broken_e ) {
             mp_msg(MSGT_NETWORK,MSGL_ERR,"Failed to parse header\n");
             http_free( http_hdr );
             return -1;
         }

-- 
Jindrich Makovicka





More information about the MPlayer-dev-eng mailing list