OSDN Git Service

Log null author command in authordriver.cpp (bug 1922537)
authorJames Dong <jdong@google.com>
Wed, 17 Jun 2009 23:24:08 +0000 (16:24 -0700)
committerJames Dong <jdong@google.com>
Wed, 17 Jun 2009 23:24:08 +0000 (16:24 -0700)
Note this does not resolve the root cause for the mediaserver crash reported in bug 1922537:
1. why was a null author command received from the author engine (PV is looking into this issue)?
2. why was the time stamp out of the order (QCOM and PV are looking into this issue)?
3. why did we receive multiple event callbacks for a single state transition request (QCOM is looking into this issue)?

android/author/authordriver.cpp

index 547ac44..24d5ebb 100644 (file)
@@ -1100,7 +1100,11 @@ void AuthorDriver::CommandCompleted(const PVCmdResponse& aResponse)
 {
     author_command *ac = (author_command *)aResponse.GetContext();
     status_t s = aResponse.GetCmdStatus();
-    LOGV("Command (%d) completed with status(%d)", ac->which, s);
+    LOGV("Command (%d) completed with status(%d)", ac? ac->which: -1, s);
+    if (ac == NULL) {
+        LOGE("CommandCompleted: Error - null author command!");
+        return;
+    }
 
     if (ac->which == AUTHOR_SET_OUTPUT_FORMAT) {
         mSelectedComposer = aResponse.GetResponseData();