Author: dmeyer
Date: Thu Feb 15 16:17:28 2007
New Revision: 2493

Modified:
   trunk/popcorn/src/backends/mplayer/player.py

Log:
fix possible crash if url contains =

Modified: trunk/popcorn/src/backends/mplayer/player.py
==============================================================================
--- trunk/popcorn/src/backends/mplayer/player.py        (original)
+++ trunk/popcorn/src/backends/mplayer/player.py        Thu Feb 15 16:17:28 2007
@@ -225,8 +225,10 @@
             self._state = STATE_PAUSED
 
         elif line.startswith("ID_") and line.find("=") != -1:
-            attr, value = line.split("=")
-            attr = attr[3:]
+            # attr, value = line.split("=") could crash if the filename
+            # contains a '=' (which could happen very easy in an http url)
+            attr = line[3:line.find('=')]
+            value = line[line.find('=')+1]
             info = { "VIDEO_FORMAT": ("vfourcc", str),
                      "VIDEO_BITRATE": ("vbitrate", int),
                      "VIDEO_WIDTH": ("width", int),

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to