Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Unified Diff: content/gpu/omx_video_decode_accelerator.cc

Issue 7017006: Fix the EOS hang. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/omx_video_decode_accelerator.cc
===================================================================
--- content/gpu/omx_video_decode_accelerator.cc (revision 85602)
+++ content/gpu/omx_video_decode_accelerator.cc (working copy)
@@ -294,7 +294,7 @@
}
assigned_picture_buffers_.insert(
- assigned_picture_buffers_.begin(),
+ assigned_picture_buffers_.end(),
picture_buffers.begin(),
picture_buffers.end());
@@ -396,6 +396,7 @@
flush_done_callback_ = callback;
OMX_BUFFERHEADERTYPE* omx_buffer = free_input_buffers_.front();
+ free_input_buffers_.pop();
omx_buffer->nFilledLen = 0;
omx_buffer->nAllocLen = omx_buffer->nFilledLen;
omx_buffer->nFlags |= OMX_BUFFERFLAG_EOS;
@@ -529,7 +530,6 @@
OutputPicture output_picture = output_pictures_[i];
client_->DismissPictureBuffer(output_picture.first);
}
- output_pictures_.clear();
}
void OmxVideoDecodeAccelerator::OnStateChangeExecutingToIdle(
@@ -669,7 +669,7 @@
// Calls to OMX to free buffers.
OMX_ERRORTYPE result;
OMX_BUFFERHEADERTYPE* omx_buffer;
- for (int i = 0; i < input_buffer_count_; ++i) {
+ while (!free_input_buffers_.empty()) {
omx_buffer = free_input_buffers_.front();
free_input_buffers_.pop();
result = OMX_FreeBuffer(component_handle_, input_port_, omx_buffer);
@@ -855,6 +855,8 @@
// has not been reached.
OMX_ERRORTYPE result;
OMX_STATETYPE il_state;
+ if (client_state_ == OMX_StateLoaded)
+ return false;
result = OMX_GetState(component_handle_, &il_state);
if (result != OMX_ErrorNone) {
LOG(ERROR) << "SendCommand(OMX_CommandPortDisable) failed";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698