Merge "Fix bugs regarding clamping of numFrames variable."
am: 615d9ff50e

Change-Id: I948a0626bb9c3ca0c65eed3ba38cb905e285c7ca