Skip to content
This repository
Browse code

Merge pull request #3094 from koying/fixstagefright

Various libstagefright fixes
  • Loading branch information...
commit 4a9d3a6b489feac1b4178da2b3fd549b286efe3a 2 parents 6b3ff42 + f359369
Chris Browet authored August 19, 2013
16  xbmc/cores/dvdplayer/DVDCodecs/Video/StageFrightVideo.cpp
@@ -298,10 +298,11 @@ class CStageFrightDecodeThread : public CThread
298 298
       else
299 299
       {
300 300
         CLog::Log(LOGERROR, "%s - decoding error (%d)\n", CLASSNAME,frame->status);
301  
-        decode_done   = 1;
302 301
         if (frame->medbuf)
303 302
           frame->medbuf->release();
304 303
         frame->medbuf = NULL;
  304
+        free(frame);
  305
+        continue;
305 306
       }
306 307
 
307 308
       if (frame->format == RENDER_FMT_EGLIMG)
@@ -501,12 +502,8 @@ bool CStageFrightVideo::Open(CDVDStreamInfo &hints)
501 502
     goto fail;
502 503
   }
503 504
 
504  
-  p->mVideoNativeWindow = NULL;
505 505
   if ((p->quirks & QuirkSWRender) == 0)
506  
-  {
507 506
     p->InitStagefrightSurface();
508  
-    native_window_api_connect(p->mVideoNativeWindow.get(), NATIVE_WINDOW_API_MEDIA);
509  
-  }
510 507
 
511 508
   p->decoder  = OMXCodec::Create(p->client->interface(), p->meta,
512 509
                                          false, p->source, NULL,
@@ -532,12 +529,17 @@ bool CStageFrightVideo::Open(CDVDStreamInfo &hints)
532 529
     CLog::Log(LOGDEBUG, "%s::%s - component: %s\n", CLASSNAME, __func__, component);
533 530
 
534 531
     //Blacklist
535  
-    if (!strncmp(component, "OMX.Nvidia.mp4.decode", 21) && g_advancedSettings.m_stagefrightConfig.useMP4codec != 1)
  532
+    if (!strncmp(component, "OMX.google", 10))
  533
+    {
  534
+      // On some platforms, software decoders are returned anyway
  535
+      CLog::Log(LOGERROR, "%s::%s - %s\n", CLASSNAME, __func__,"Blacklisted component (software)");
  536
+      goto fail;
  537
+    }
  538
+    else if (!strncmp(component, "OMX.Nvidia.mp4.decode", 21) && g_advancedSettings.m_stagefrightConfig.useMP4codec != 1)
536 539
     {
537 540
       // Has issues with some XVID encoded MP4. Only fails after actual decoding starts...
538 541
       CLog::Log(LOGERROR, "%s::%s - %s\n", CLASSNAME, __func__,"Blacklisted component (MP4)");
539 542
       goto fail;
540  
-
541 543
     }
542 544
     else if (!strncmp(component, "OMX.rk.", 7))
543 545
     {
1  xbmc/cores/dvdplayer/DVDCodecs/Video/StageFrightVideoPrivate.cpp
@@ -324,6 +324,7 @@ bool CStageFrightVideoPrivate::InitStagefrightSurface()
324 324
   mSurface = new CJNISurface(*mSurfTexture);
325 325
 
326 326
   mVideoNativeWindow = ANativeWindow_fromSurface(env, mSurface->get_raw());
  327
+  native_window_api_connect(mVideoNativeWindow.get(), NATIVE_WINDOW_API_MEDIA);
327 328
 
328 329
   return true;
329 330
 }

0 notes on commit 4a9d3a6

Please sign in to comment.
Something went wrong with that request. Please try again.