[MPlayer-dev-eng] [PATCH] (take 3) Problem in libmpdemux/asf-streaming.c (was Problem in opening URLs)

Alex Eskin alexeskin at yahoo.com
Mon Mar 1 08:31:02 CET 2004


I did not get any comments on this patch, but there were several
threads, both here and on mplayer-users complaining about the
bug this is supposed to fix. 
--------

I am attaching a revised patch dealing with x-mms-asf URL's

Description of problem:

the video/x-mms-asf mime type is ambiguous. It can be

(1) An asx redirector. This is the most common usage. In fact, most
   of the windows media on the web today is behind an asx redirector
   with the video/x-mms-asf mime-type.

(2) A non-streaming microsoft media (asf) file. 

(3) An asf stream (live or prerecorded). I have never actually seen
   one, but I infer from the code that it must exist. 
   (By the way, if somebody knows a URL of this type, I would be
     very interested). 


What does the current code do:

   It assumes unconditionally type (3). If it gets type (1) or (2)
   it bails.  This has the effect of breaking most of the windows media
   sites out there. 

   In fact the current behaviour is probably not intended. The code
   is basically 
   if ( content_type == "video/x-mms-asf" ) { 
         //assume type (3)
   } else if (content_type == "video/x-mms-asf") {
          //figure out if it is type (1) or type (2)
   }
        
What does the proposed patch do:

    It is only a 99% solution. If it gets video/x-mms-url
    it peeks in the stream to see if there is an asf-streaming
    header. If yes, it is type (3). If no, then it is type (1)
    or (2). 

    It is only 99% because it does not read extra bytes from the
    socket (it only needs 5 in the buffer). There are other
    places in the code which do that, and it seems to work well.
    Still if people want a 100% solution I can recode it. 


Even if this patch is not it, I hope that some way can be found to 
solve this issue. 
     

Alex Eskin

 

__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x-ms-asf.patch
Type: text/x-patch
Size: 2038 bytes
Desc: x-ms-asf.patch
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040229/81ba7ae0/attachment.bin>


More information about the MPlayer-dev-eng mailing list