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

Change-Id: Ibac7f239c1c60deae4b17e2ce5d422576c6112a8