]> git.vomp.tv Git - vompclient.git/commitdiff
Fix crash when ffwd/rev after pause. Some log fixes
authorChris Tallon <chris@vomp.tv>
Tue, 14 Sep 2021 13:47:35 +0000 (14:47 +0100)
committerChris Tallon <chris@vomp.tv>
Tue, 14 Sep 2021 13:47:35 +0000 (14:47 +0100)
control.cc
playervideorec.cc
recinfo.cc
videoomx.cc

index 2f747a5801bf64caf37c502affd548b19d7ba720..8666cf368a02cad57f8c48a8485383436b868fa8 100644 (file)
@@ -1069,20 +1069,20 @@ void Control::doJustConnected(VConnect* vconnect)
   {
     if (!STRCASECMP(config, "S-Video"))
     {
-      logger->info(TAG, "Switching to S-Video as Connection=%s", config);
+      logger->info(TAG, "Switching to S-Video as Connection={}", config);
       video->setConnection(Video::SVIDEO);
     } else  if (!STRCASECMP(config, "HDMI"))
     {
-      logger->info(TAG, "Switching to HDMI as Connection=%s", config);
+      logger->info(TAG, "Switching to HDMI as Connection={}", config);
       video->setConnection(Video::HDMI);
     } else  if (!STRCASECMP(config, "HDMI3D"))
     {
-      logger->info(TAG, "Switching to HDMI3D as Connection=%s", config);
+      logger->info(TAG, "Switching to HDMI3D as Connection={}", config);
       video->setConnection(Video::HDMI3D);
     }
     else
     {
-      logger->info(TAG, "Switching to RGB/Composite as Connection=%s", config);
+      logger->info(TAG, "Switching to RGB/Composite as Connection={}", config);
       video->setConnection(Video::COMPOSITERGB);
     }
     delete[] config;
@@ -1265,8 +1265,9 @@ void Control::doJustConnected(VConnect* vconnect)
 //    handleCommand(Input::OK);
 //    handleCommand(Input::THREE);
 //    handleCommand(Input::SIX);
-//    handleCommand(Input::OK);
 //    handleCommand(Input::UP);
+//    handleCommand(Input::OK);
+//    handleCommand(Input::OK);
 //    handleCommand(Input::PLAY);
 //    handleCommand(Input::DOWN);
 //    handleCommand(Input::DOWN);
index 43793d875c8252096dd5a8ee8c92543fdaaefcaa..046346bfb98adf51be31511758e61a1654850f35 100644 (file)
@@ -135,6 +135,13 @@ void PlayerVideoRec::threadStart()
 void PlayerVideoRec::threadStop()
 {
   playerThreadMutex.lock();
+
+  if (!playerThread.joinable())  // restartAtFrame sometimes calls threadStop when it's not running
+  {
+    playerThreadMutex.unlock();
+    return;
+  }
+
   threadReqQuit = true;
   playerThreadCond.notify_one();
   playerThreadMutex.unlock();
index bfcdd9be1dc4a553b0c67c2786fdc5cc3968af51..77e9056a86c4eb6f74ba20d46a0b2926d1f6f4ec 100644 (file)
@@ -54,14 +54,14 @@ RecInfo::RecInfo()
 
 RecInfo::~RecInfo()
 {
-  LogNT::getInstance()->info(TAG, "Deleting recinfo: %lu, %s", numComponents, summary);
+  LogNT::getInstance()->info(TAG, "Deleting recinfo: {}, {}", numComponents, summary);
 
   if (summary) delete[] summary;
 
   for (ULONG i = 0; i < numComponents; i++)
   {
-    LogNT::getInstance()->info(TAG, "i: %lu, languages[i]=%p:%s", i, languages[i], languages[i]);
-    LogNT::getInstance()->info(TAG, "i: %lu, descripti[i]=%p:%s", i, descriptions[i], descriptions[i]);
+    LogNT::getInstance()->info(TAG, "i: {}, languages[i]={:p}:{}", i, (void*)languages[i], languages[i]);
+    LogNT::getInstance()->info(TAG, "i: {}, descripti[i]={:p}:{}", i, (void*)descriptions[i], descriptions[i]);
     if (languages[i]) delete[] (languages[i]);
     if (descriptions[i]) delete[] (descriptions[i]);
   }
index 9986b28ccf4c41a3c885cd73672af0742904aecb..681f2b3a0209b576a6e36d3d779c854320b07f09 100644 (file)
@@ -914,7 +914,7 @@ int VideoOMX::initClock()
 
 
        }
-       logger->debug(TAG, "init omx clock {:#x} {:#x}", (void*)this, omx_clock);
+       logger->debug(TAG, "init omx clock {:p} {}", (void*)this, omx_clock);
        clock_references++;
        clock_mutex.unlock();
        return 1;
@@ -1834,7 +1834,7 @@ int VideoOMX::WaitForEvent(OMX_HANDLETYPE handle,OMX_U32 event, int wait) //need
         i++;
 
        }
-       logger->debug(TAG, "WaitForEvent waited too long {:#x} {:#x}",handle,event);
+       logger->debug(TAG, "WaitForEvent waited too long {:p} {:#x}",(void*)handle,event);
        return 0;
 
 }