Matroskaextractor: improve findThumbnails() time.
For Matroska, traversing to find the first 20 keyframes is very
time-consuming, typically 1000 (1 key frame per 50 frames) - 2000 (
1 key frame per 100 frames) iterations are required, resulting in
findThumbnails() takes 2-4s, or even more.
Now add an additional judgment condition: when the parser time (the
timestamp of the current iteration block) exceeds 20s and at least one
key frame has been found, end the iteration.
Bug: 332463097
Test: atest CtsMediaExtractorTestCases
Change-Id: I21303552c4c862dd960054d86e1133e067f9326a
Signed-off-by: guochuang <guochuang@xiaomi.corp-partner.google.com>
Loading
Please register or sign in to comment