[MPlayer-users] .ram files don't play and a possible patch

Raphael Clifford raphael at clifford.net
Wed Aug 6 12:52:23 CEST 2003


If you try to play a .ram file over the net it will fail in mplayer (0.9 
up to CVS 31/07/03 tested). This is simply because a .ram file is in 
fact a text file with the URL of the real stream in it.  If you are 
trying to play an embedded stream with mplayerplugin this is can be 
pretty fatal.

Here is a possible diff file (reproduced with permission of the author 
who is not me but is not on the list).

Index: playtreeparser.c
===================================================================
RCS file: /home/cvs/xtools/mplayer/build/src/0.90/playtreeparser.c,v
retrieving revision 1.1
retrieving revision 1.3
diff -u -r1.1 -r1.3
--- playtreeparser.c	2003/04/08 07:40:07	1.1
+++ playtreeparser.c	2003/06/12 12:50:26	1.3
@@ -92,6 +92,9 @@
     break;
   }
 
+  if(!end)
+      end = p->iter + strlen(p->iter);
+    
   line_end = ((*(end-1)) == '\r') ? end-1 : end;
   if(line_end - p->iter >= 0)
     p->line = (char*)realloc(p->line,line_end - p->iter+1);
@@ -107,6 +110,8 @@
     if(end[0] != '\0') {
       p->buffer_end -= end-p->iter;
       memmove(p->buffer,end,p->buffer_end);
+      p->buffer[p->buffer_end] = '\n';
+      p->buffer[p->buffer_end+1] = '\0';
     } else
       p->buffer_end = 0;
     p->iter = p->buffer;
@@ -579,7 +584,7 @@
   assert(p != NULL);
 #endif
 
-
+  forced = 1;
   while(play_tree_parser_get_line(p) != NULL) {
     play_tree_parser_reset(p);
 

Cheers,
Raphael



More information about the MPlayer-users mailing list