diff options
| author | Andy Hung <hunga@google.com> | 2015-06-19 15:57:05 +0000 | 
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-19 15:57:05 +0000 | 
| commit | f86e831ec0cbdce2d34c48fc567ad91a47099b70 (patch) | |
| tree | b6413cb2650e0b25d3000780b0fe2517640a719f /media | |
| parent | b36bc776545d9758f3bc9a853a5a0fd51280e9fb (diff) | |
| parent | 6653c935d2518a713587b3887ca09aa09ebfa7fd (diff) | |
| download | frameworks_av-f86e831ec0cbdce2d34c48fc567ad91a47099b70.zip frameworks_av-f86e831ec0cbdce2d34c48fc567ad91a47099b70.tar.gz frameworks_av-f86e831ec0cbdce2d34c48fc567ad91a47099b70.tar.bz2  | |
Merge "Return DEAD_OBJECT if getTimestamp cannot restore track" into mnc-dev
Diffstat (limited to 'media')
| -rw-r--r-- | media/libmedia/AudioTrack.cpp | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 949bc21..b5d7614 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -2207,7 +2207,12 @@ status_t AudioTrack::getTimestamp(AudioTimestamp& timestamp)      }      if (mCblk->mFlags & CBLK_INVALID) { -        restoreTrack_l("getTimestamp"); +        const status_t status = restoreTrack_l("getTimestamp"); +        if (status != OK) { +            // per getTimestamp() API doc in header, we return DEAD_OBJECT here, +            // recommending that the track be recreated. +            return DEAD_OBJECT; +        }      }      // The presented frame count must always lag behind the consumed frame count.  | 
