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)
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,
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))
{
- // 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)");
+ // 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.rk.", 7))
+ else if (!strncmp(component, "OMX.Nvidia.mp4.decode", 21) && g_advancedSettings.m_stagefrightConfig.useMP4codec != 1)
{
- if (g_advancedSettings.m_stagefrightConfig.useAVCcodec != 1 && g_advancedSettings.m_stagefrightConfig.useMP4codec != 1)
- {
- if (p->width % 32 != 0 || p->height % 16 != 0)
- {
- // Buggy. Hard crash on non MOD16 height videos and stride errors for non MOD32 width
- CLog::Log(LOGERROR, "%s::%s - %s\n", CLASSNAME, __func__,"Blacklisted component (MOD16)");
- goto fail;
-
- }
- }
+ // 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;
}
}
Frame *frame;
int demuxer_bytes = iSize;
uint8_t *demuxer_content = pData;
+ int ret = 0;
if (demuxer_content)
{
frame->pts = (dts != DVD_NOPTS_VALUE) ? pts_dtoi(dts) : ((pts != DVD_NOPTS_VALUE) ? pts_dtoi(pts) : 0);
else
frame->pts = (pts != DVD_NOPTS_VALUE) ? pts_dtoi(pts) : ((dts != DVD_NOPTS_VALUE) ? pts_dtoi(dts) : 0);
+
+ // No valid pts? libstagefright asserts on this.
+ if (frame->pts < 0)
+ {
+ free(frame);
+ return ret;
+ }
+
frame->medbuf = p->getBuffer(demuxer_bytes);
if (!frame->medbuf)
{
free(frame);
return VC_ERROR;
}
+
fast_memcpy(frame->medbuf->data(), demuxer_content, demuxer_bytes);
frame->medbuf->meta_data()->clear();
frame->medbuf->meta_data()->setInt64(kKeyTime, frame->pts);
p->in_mutex.unlock();
}
- int ret = 0;
if (p->inputBufferAvailable() && p->in_queue.size() < INBUFCOUNT)
ret |= VC_BUFFER;
else