Merge change 23356 into eclair
* changes: Temporarily unlock our mutex while fetching a buffer from the upstream source.
This commit is contained in:
@@ -1321,6 +1321,10 @@ void OMXCodec::drainInputBuffer(BufferInfo *info) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We're going to temporarily give up the lock while reading data
|
||||||
|
// from the source. A certain client unfortunately chose to have the
|
||||||
|
// thread supplying input data and reading output data be the same...
|
||||||
|
|
||||||
MediaBuffer *srcBuffer;
|
MediaBuffer *srcBuffer;
|
||||||
status_t err;
|
status_t err;
|
||||||
if (mSeekTimeUs >= 0) {
|
if (mSeekTimeUs >= 0) {
|
||||||
@@ -1328,10 +1332,13 @@ void OMXCodec::drainInputBuffer(BufferInfo *info) {
|
|||||||
options.setSeekTo(mSeekTimeUs);
|
options.setSeekTo(mSeekTimeUs);
|
||||||
mSeekTimeUs = -1;
|
mSeekTimeUs = -1;
|
||||||
|
|
||||||
|
mLock.unlock();
|
||||||
err = mSource->read(&srcBuffer, &options);
|
err = mSource->read(&srcBuffer, &options);
|
||||||
} else {
|
} else {
|
||||||
|
mLock.unlock();
|
||||||
err = mSource->read(&srcBuffer);
|
err = mSource->read(&srcBuffer);
|
||||||
}
|
}
|
||||||
|
mLock.lock();
|
||||||
|
|
||||||
OMX_U32 flags = OMX_BUFFERFLAG_ENDOFFRAME;
|
OMX_U32 flags = OMX_BUFFERFLAG_ENDOFFRAME;
|
||||||
OMX_TICKS timestamp = 0;
|
OMX_TICKS timestamp = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user