[MPlayer-users] Re: Mplayer crashing, streaming from

adland adland123 at yahoo.com
Sun Mar 21 08:37:13 CET 2004


Karl Trygve Kalleberg <karltk <at> prosalg.no> writes:

> 
> Hi gang.
> 
> I've been trying to use mplayer to stream from Windows Media
 Player

> The first link served by the web server is to an XML file
> 
> If I save this file to disk, say foo.xml, and 
> run mplayer on it:
> # mplayer foo.xml
> 
> mplayer will invariably crash, giving:
> 
> Playing foo.xml.
> Cache fill:  0,01% (422 bytes) LMLM4 Stream Format not found
> 

you can use mplayer -v and get more info from your example.

I have looked into this and have some idea as to the issue.

open_stream is called from mplayer.c (the boss) with our filename 
passed as the argument

when it returns it looks to see if the file_format was a playlist
(redirector)

there is a file open.c in the libmpdemux directory which has this 
function


if not a DVD,VCD, SMB or URL it assumes we have stdin or a plain 
file as last resort.

Well it is a plain file but it contains no audio or video stream
 data  it is a playlist file in our case

I inserted this hack code to make a quick test which 
seems to work
(files ending in .asx are treated specially 
from all other files)

see below from open.c

// Open a new stream  (stdin/file/vcd/url)

stream_t* open_stream(char* filename,
char** options, int* file_format){

 < ...lots of code omitted ...>

//new changes
// Redirector special file - dirty quick hack
// of course all files ending in ".asx" (nocase) may not 
// be redirectors 
//oh well this is just a test
if (strlen(filename)>4 && strncasecmp(filename+(strlen(filename)-4),".asx",4)==0)
{
printf("We have an ASX redirector file as input \n");
stream=open_stream_full(filename,STREAM_READ,options,file_format);
*file_format=DEMUXER_TYPE_PLAYLIST;
//Override DEMUXER_TYPE_UNKNOWN
return stream;
}

//put before this old code for any old disk file

//============ Open STDIN or plain FILE ============

return open_stream_full(filename,STREAM_READ,options,file_format);



if we left it as coded before then I think it tries to parse 
the file
 as if it were local to the disk and this fails 

(playtreeparser.c is file for this if you are interested)

someone who owns this code would want to make a better patch.
this is just a quick change for testing.

hope this will help with your issue.




More information about the MPlayer-users mailing list