summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2015-08-20 17:59:10 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-20 17:59:10 +0000
commita07ad8901acd0b4c1eeab5e0c44b56b692662a92 (patch)
tree851e233353c1bcf23e6c3242d64408fbc0ca7368 /media/libstagefright
parentf076fabff7a518ed5668a9a1be03dd729b8cbfb6 (diff)
parent776bfd806a1619ac0944d4ea36330c4cde4d665d (diff)
downloadframeworks_av-a07ad8901acd0b4c1eeab5e0c44b56b692662a92.zip
frameworks_av-a07ad8901acd0b4c1eeab5e0c44b56b692662a92.tar.gz
frameworks_av-a07ad8901acd0b4c1eeab5e0c44b56b692662a92.tar.bz2
am 776bfd80: am 8a55bcb6: resolved conflicts for merge of ced2dd3c to lmp-dev
* commit '776bfd806a1619ac0944d4ea36330c4cde4d665d': Sanity check padding/delay values for gapless playback
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/SkipCutBuffer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/media/libstagefright/SkipCutBuffer.cpp b/media/libstagefright/SkipCutBuffer.cpp
index e2e6d79..1da1e5e 100644
--- a/media/libstagefright/SkipCutBuffer.cpp
+++ b/media/libstagefright/SkipCutBuffer.cpp
@@ -25,6 +25,13 @@
namespace android {
SkipCutBuffer::SkipCutBuffer(int32_t skip, int32_t cut) {
+
+ if (skip < 0 || cut < 0 || cut > 64 * 1024) {
+ ALOGW("out of range skip/cut: %d/%d, using passthrough instead", skip, cut);
+ skip = 0;
+ cut = 0;
+ }
+
mFrontPadding = mSkip = skip;
mBackPadding = cut;
mWriteHead = 0;