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

Issue 2008373003: [M-52] Close bitstream buffer shared memory handles on Android. (Closed)

Created:
4 years, 7 months ago by liberato (no reviews please)
Modified:
4 years, 7 months ago
Reviewers:
CC:
chromium-reviews, posciak+watch_chromium.org, piman+watch_chromium.org, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@2743
Target Ref:
refs/pending/branch-heads/2743
Project:
chromium
Visibility:
Public.

Description

[M-52] Close bitstream buffer shared memory handles on Android. AndroidVideoDecodeAccelerator would clear references to pending bitstream buffers in ::Reset and, implicitly, in the destructor. However, each of those may have a file descriptor for shared memory that isn't closed. During a seek, for example, this can cause leaks. This CL wraps the queue of pending bitstream buffers with a new BitstreamRecord type, which has a unique_ptr to the (unmapped) shared memory region, if any. This will automatically close the underlying handle when the unique_ptr is released. Note that no expensive operation is performed in creating the shared memory region. Unless it is later mapped, it just keeps the handle and ::close()s it on destruction. This is a merge of https://codereview.chromium.org/2011653002 . BUG=614489 TEST=observed /proc/fd/[gpu process] while seeking in a video NOPRESUBMIT=true NOTRY=true TBR=dalecurtis@chromium.org

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -18 lines) Patch
M media/gpu/android_video_decode_accelerator.h View 2 chunks +17 lines, -1 line 0 comments Download
M media/gpu/android_video_decode_accelerator.cc View 9 chunks +32 lines, -17 lines 0 comments Download

Messages

Total messages: 9 (5 generated)
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2008373003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2008373003/1
4 years, 7 months ago (2016-05-25 21:48:00 UTC) #2
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
4 years, 7 months ago (2016-05-25 21:48:02 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2008373003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2008373003/1
4 years, 7 months ago (2016-05-25 21:52:47 UTC) #7
commit-bot: I haz the power
4 years, 7 months ago (2016-05-25 21:54:42 UTC) #9
Message was sent while issue was closed.
Committed patchset #1 (id:1)

Powered by Google App Engine
This is Rietveld 408576698