Author: tack
Date: Thu Nov 30 15:27:14 2006
New Revision: 2131

Modified:
   trunk/canvas/src/movie.py

Log:
Don't stop player before opening new file to workaround popcorn bug;
set_data on image to null if frame format changes from BGRA to YV12 to fix
segfault (import pixels tries to memory from last set_data which is most
likely no longer valid).


Modified: trunk/canvas/src/movie.py
==============================================================================
--- trunk/canvas/src/movie.py   (original)
+++ trunk/canvas/src/movie.py   Thu Nov 30 15:27:14 2006
@@ -122,6 +122,7 @@
         
self._player.signals["stream_changed"].connect_weak(self._stream_changed)
 
         self._window = None
+        self._last_format = None
         self.osd = None
 
         self.signals.update({
@@ -151,7 +152,7 @@
             self.open(mrl)
 
     def open(self, mrl):
-        self._player.stop()
+        #self._player.stop()
         self._open(mrl)
         self._aspect = 0.0
 
@@ -296,6 +297,8 @@
             self._aspect = aspect
 
         if format == "yv12":
+            if self._last_format != 'yv12':
+                self._o.data_set(0, False)
             self.import_pixels(ptr, width, height, 
evas.PIXEL_FORMAT_YUV420P_601)
         else:
             self.set_data(width, height, ptr)
@@ -321,6 +324,7 @@
 
         self.get_canvas().signals["updated"].disconnect(self._sync)
         self.get_canvas().signals["updated"].connect_once(self._sync)
+        self._last_format = format
 
 
     def _sync(self, regions):

-------------------------------------------------------------------------
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