Chromium Code Reviews
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 #
Messages
Total messages: 9 (5 generated)
|
||||||||||||||||||||||||||||