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

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

Issue 10837212: OMX: Don't try to send buffers when in resetting state. (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 de862197752cc2d491d7c388b15a5266ccc374a3..2e1c5fc80aeb6dbf23a1a8d5d025e9dda57911b1 100644
--- a/content/common/gpu/media/omx_video_decode_accelerator.cc
+++ b/content/common/gpu/media/omx_video_decode_accelerator.cc
@@ -359,6 +359,14 @@ void OmxVideoDecodeAccelerator::ReusePictureBuffer(int32 picture_buffer_id) {
TRACE_EVENT1("Video Decoder", "OVDA::ReusePictureBuffer",
"Picture id", picture_buffer_id);
DCHECK_EQ(message_loop_, MessageLoop::current());
+
+ // If we are resetting, don't bother, as OMX_FillThisBuffer will fail anyway.
+ // If we're in the middle of closing, this will put the Accelerator in
+ // ERRORING mode, which has the side effect of not going through the
+ // OMX_FreeBuffers path and leaks memory.
+ if (current_state_change_ == RESETTING)
Ami GONE FROM CHROMIUM 2012/08/11 04:29:00 || DESTROYING || ERRORING
marcheu 2012/08/13 19:23:04 Done.
+ return;
+
RETURN_ON_FAILURE(CanFillBuffer(), "Can't fill buffer", ILLEGAL_STATE,);
OutputPictureById::iterator it = pictures_.find(picture_buffer_id);
« 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