OSDN Git Service

Properly serialize access to FileSource::getSize by acquiring the mutex
authorAndreas Huber <andih@google.com>
Fri, 2 Sep 2011 16:34:51 +0000 (09:34 -0700)
committerAndreas Huber <andih@google.com>
Fri, 2 Sep 2011 16:34:51 +0000 (09:34 -0700)
commit3a13fad63af40a8364fce796b1a54a8f0a2fbf32
treea99d1e91d87550a46a523acfc0734a72f56db917
parentd681bbb1767bed09415e050ba78975df214bcd68
Properly serialize access to FileSource::getSize by acquiring the mutex

Both ::getSize and ::read call into lseek64, if this happens simultaneously
from multiple threads the results are undefined if not properly serialized.

Change-Id: I737cafebd836f3d8eb702beac557b4731f69c6f6
related-to-bug: 5196490
media/libstagefright/FileSource.cpp