Fix native exception occurred when seeking mp4 file
The sample count of stsz box is not equal to the sample count of stts box. For example, the sample count of stts box is 1502 but the sample count of stsz box is 1503. Besides, mSampleTimeEntries is not initialized with 0 when the code is built. Therefore, if getSampleTime() function is called with index 1502, for example, we use a sample with sample count of stsz box to be 1503, the mCompositionTime with random value will be used, which might result in a overflow issue. Bug: 136425704 Test: Seek a mp4 file which causes native exception before this patch, and check if there is no exception Change-Id: I8b56e58b5b52e0bbd8e6e92fc0f381006780c3d5
Loading
Please register or sign in to comment