CLog::Log(LOGERROR, "%s::%s - %s\n", CLASSNAME, __func__,"Blacklisted component (MP4)");
goto fail;
}
- else if (!strncmp(component, "OMX.rk.", 7))
- {
- 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;
-
- }
- }
- }
}
cropLeft = cropTop = cropRight = cropBottom = 0;
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