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

Unified Diff: content/common/gpu/media/omx_video_decode_accelerator.cc

Issue 10832263: OMX: Don't leave FreeOutputBuffers if MakeCurrent fails. (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Created 8 years, 4 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/common/gpu/media/omx_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/omx_video_decode_accelerator.cc b/content/common/gpu/media/omx_video_decode_accelerator.cc
index 956742d7eca9ae5154efd2f92414462acbb9f0f4..89d9dc5d5cae6ea8a989a9b3965666b876a1552f 100644
--- a/content/common/gpu/media/omx_video_decode_accelerator.cc
+++ b/content/common/gpu/media/omx_video_decode_accelerator.cc
@@ -713,9 +713,6 @@ void OmxVideoDecodeAccelerator::FreeOutputBuffers() {
// Calls to OMX to free buffers.
OMX_ERRORTYPE result;
- if (!make_context_current_.Run())
- return;
-
for (OutputPictureById::iterator it = pictures_.begin();
it != pictures_.end(); ++it) {
OMX_BUFFERHEADERTYPE* omx_buffer = it->second.omx_buffer_header;
@@ -723,8 +720,11 @@ void OmxVideoDecodeAccelerator::FreeOutputBuffers() {
delete reinterpret_cast<media::Picture*>(omx_buffer->pAppPrivate);
result = OMX_FreeBuffer(component_handle_, output_port_, omx_buffer);
RETURN_ON_OMX_FAILURE(result, "OMX_FreeBuffer", PLATFORM_FAILURE,);
- texture_to_egl_image_translator_->DestroyEglImage(egl_display_,
- it->second.egl_image);
+
+ // If make_context_current_.Run() fails, we still want to keep iterating.
+ if (make_context_current_.Run())
Ami GONE FROM CHROMIUM 2012/08/11 04:23:37 multi-line if bodies require braces in chromium st
Ami GONE FROM CHROMIUM 2012/08/11 04:23:37 Do you have an idea of what can cause the makecurr
piman 2012/08/11 04:50:12 It doesn't look like we need to make_context_curre
+ texture_to_egl_image_translator_->DestroyEglImage(egl_display_,
+ it->second.egl_image);
if (client_)
client_->DismissPictureBuffer(it->first);
}
« 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