Correctly decrement OmxVideoDecodeAccelerator::output_buffers_at_component_ during Reset/Destroy.
Review URL: https://chromiumcodereview.appspot.com/10961059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158285 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@ -849,14 +849,6 @@ void OmxVideoDecodeAccelerator::OnOutputPortEnabled() {
|
||||
void OmxVideoDecodeAccelerator::FillBufferDoneTask(
|
||||
OMX_BUFFERHEADERTYPE* buffer) {
|
||||
|
||||
// If we are destroying and then get a fillbuffer callback, calling into any
|
||||
// openmax function will put us in error mode, so bail now. In the RESETTING
|
||||
// case we still need to enqueue the picture ids but have to avoid giving
|
||||
// them to the client (this is handled below).
|
||||
if (current_state_change_ == DESTROYING ||
|
||||
current_state_change_ == ERRORING)
|
||||
return;
|
||||
|
||||
media::Picture* picture =
|
||||
reinterpret_cast<media::Picture*>(buffer->pAppPrivate);
|
||||
int picture_buffer_id = picture ? picture->picture_buffer_id() : -1;
|
||||
@ -867,6 +859,14 @@ void OmxVideoDecodeAccelerator::FillBufferDoneTask(
|
||||
DCHECK_GT(output_buffers_at_component_, 0);
|
||||
--output_buffers_at_component_;
|
||||
|
||||
// If we are destroying and then get a fillbuffer callback, calling into any
|
||||
// openmax function will put us in error mode, so bail now. In the RESETTING
|
||||
// case we still need to enqueue the picture ids but have to avoid giving
|
||||
// them to the client (this is handled below).
|
||||
if (current_state_change_ == DESTROYING ||
|
||||
current_state_change_ == ERRORING)
|
||||
return;
|
||||
|
||||
if (fake_output_buffers_.size() && fake_output_buffers_.count(buffer)) {
|
||||
size_t erased = fake_output_buffers_.erase(buffer);
|
||||
DCHECK_EQ(erased, 1U);
|
||||
|
Reference in New Issue
Block a user