[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-datatype-cvs
Subject:    [Datatype-cvs] mkv/fileformat mkv_file_format.cpp, 1.11.2.29, 1.11.2.30
From:       fashengli () helixcommunity ! org
Date:       2012-08-09 10:27:49
[Download RAW message or body]

Update of /cvsroot/datatype/mkv/fileformat
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv8650

Modified Files:
      Tag: hxclient_3_6_1_atlas
	mkv_file_format.cpp 
Log Message:
Synopsis:     Fix bug of mkv file format

Overview:     Bug 1: when playing a file in loop mode on letv, it sometimes crashes \
                near the end of the play.
                        In loop mode, TLC will restart next play when previous play \
                is over.
                        It will call prepare again for the same file. Actually, this \
preparation is not necessary.  The mkv handle will be close when preparing. But \
before the mkv handle being closed, mkv file format may already register a callback \
                into scheduler.
                        This will cause crash when the callback is called but mkv \
                handle has been closed.
                        We should skip the callback by judging if mkv handle is NULL.

                    Bug 2: A condition is wrong in a previous CR. Correct it.



Index: mkv_file_format.cpp
===================================================================
RCS file: /cvsroot/datatype/mkv/fileformat/mkv_file_format.cpp,v
retrieving revision 1.11.2.29
retrieving revision 1.11.2.30
diff -u -d -r1.11.2.29 -r1.11.2.30
--- mkv_file_format.cpp	12 Jul 2012 04:24:47 -0000	1.11.2.29
+++ mkv_file_format.cpp	9 Aug 2012 10:27:46 -0000	1.11.2.30
@@ -913,7 +913,7 @@
 {
     HX_RESULT retVal = HXR_OK;
 
-    if (m_bStreamDone) 
+    if (m_bStreamDone || (m_pMKVHandle == NULL)) 
     {
         return HXR_NO_DATA;
     }
@@ -1179,7 +1179,7 @@
         {
             UINT32 ulHandle = m_pScheduler->RelativeEnter(this, 0);
             retVal = (ulHandle) ? HXR_OK : HXR_FAIL;
-            if ( SUCCEEDED(retVal) ) 
+            if ( !SUCCEEDED(retVal) ) 
             {
                 m_pFormatResponse->PacketReady(HXR_READ_ERROR,NULL);
             }


_______________________________________________
Datatype-cvs mailing list
Datatype-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/datatype-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic