[MPlayer-users] [patch] fix for autodetection of SMIL files

Gavin McCullagh gmccullagh at gmail.com
Mon Jan 19 23:57:59 CET 2009


Hi MPlayer folks,

as always, many thanks for your awesome piece of software which I, for one,
use all over the place.

During a discussion on the Irish MythTV list, a bug was identified in
mplayer's SMIL detection.

http://www.fdntech.com/pipermail/mythtv-ireland/2009-January/thread.html#311

I've come up with a patch (see below) based on on the current ubuntu jaunty
mplayer source (2:1.0~rc2-0ubuntu17).  This allows mplayer to play this
smil file:

 http://dynamic.rte.ie/av/228-2476865-512-288.smil

which is couldn't before (unless you opened the file and snagged the rtsp
file out manually.

I'm not on the list, so if you could Cc me on any discussion I'd appreciate
it.  I'm unsure if the comparison should be to "<!DOCTYPE smil" or just
"<!DOCTYPE".  Perhaps someone might know better?

Thanks in advance,
Gavin

gavinmc at bambi:~/src/mplayer-1.0~rc2$ diff -u playtreeparser.c.orig playtreeparser.c
--- playtreeparser.c.orig       2009-01-19 22:23:56.000000000 +0000
+++ playtreeparser.c    2009-01-19 21:58:37.000000000 +0000
@@ -450,6 +450,8 @@
       continue;
     if (strncasecmp(line,"<?xml",5)==0) // smil in xml
       continue;
+    if (strncasecmp(line,"<!DOCTYPE smil",13)==0) // smil in xml
+      continue;
     if (strncasecmp(line,"<smil",5)==0 || strncasecmp(line,"<?wpl",5)==0 ||
       strncasecmp(line,"(smil-document",14)==0)
       break; // smil header found






More information about the MPlayer-users mailing list