Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #3094 from koying/fixstagefright

Various libstagefright fixes
  • Loading branch information...
commit 4a9d3a6b489feac1b4178da2b3fd549b286efe3a 2 parents 6b3ff42 + f359369
@koying koying authored
View
16 xbmc/cores/dvdplayer/DVDCodecs/Video/StageFrightVideo.cpp
@@ -298,10 +298,11 @@ class CStageFrightDecodeThread : public CThread
else
{
CLog::Log(LOGERROR, "%s - decoding error (%d)\n", CLASSNAME,frame->status);
- decode_done = 1;
if (frame->medbuf)
frame->medbuf->release();
frame->medbuf = NULL;
+ free(frame);
+ continue;
}
if (frame->format == RENDER_FMT_EGLIMG)
@@ -501,12 +502,8 @@ bool CStageFrightVideo::Open(CDVDStreamInfo &hints)
goto fail;
}
- p->mVideoNativeWindow = NULL;
if ((p->quirks & QuirkSWRender) == 0)
- {
p->InitStagefrightSurface();
- native_window_api_connect(p->mVideoNativeWindow.get(), NATIVE_WINDOW_API_MEDIA);
- }
p->decoder = OMXCodec::Create(p->client->interface(), p->meta,
false, p->source, NULL,
@@ -532,12 +529,17 @@ bool CStageFrightVideo::Open(CDVDStreamInfo &hints)
CLog::Log(LOGDEBUG, "%s::%s - component: %s\n", CLASSNAME, __func__, component);
//Blacklist
- if (!strncmp(component, "OMX.Nvidia.mp4.decode", 21) && g_advancedSettings.m_stagefrightConfig.useMP4codec != 1)
+ if (!strncmp(component, "OMX.google", 10))
+ {
+ // On some platforms, software decoders are returned anyway
+ CLog::Log(LOGERROR, "%s::%s - %s\n", CLASSNAME, __func__,"Blacklisted component (software)");
+ goto fail;
+ }
+ else if (!strncmp(component, "OMX.Nvidia.mp4.decode", 21) && g_advancedSettings.m_stagefrightConfig.useMP4codec != 1)
{
// Has issues with some XVID encoded MP4. Only fails after actual decoding starts...
CLog::Log(LOGERROR, "%s::%s - %s\n", CLASSNAME, __func__,"Blacklisted component (MP4)");
goto fail;
-
}
else if (!strncmp(component, "OMX.rk.", 7))
{
View
1  xbmc/cores/dvdplayer/DVDCodecs/Video/StageFrightVideoPrivate.cpp
@@ -324,6 +324,7 @@ bool CStageFrightVideoPrivate::InitStagefrightSurface()
mSurface = new CJNISurface(*mSurfTexture);
mVideoNativeWindow = ANativeWindow_fromSurface(env, mSurface->get_raw());
+ native_window_api_connect(mVideoNativeWindow.get(), NATIVE_WINDOW_API_MEDIA);
return true;
}
Please sign in to comment.
Something went wrong with that request. Please try again.