Bug 580531 - Handle multiple frames per chunk per packet in WebM playback statistics. r=kinetik

This commit is contained in:
Chris Pearce 2011-03-24 11:28:57 +13:00
parent c285d2e2af
commit 5522e89bd1

View File

@ -683,10 +683,10 @@ PRBool nsWebMReader::DecodeVideoFrame(PRBool &aKeyframeSkip,
memset(&si, 0, sizeof(si));
si.sz = sizeof(si);
vpx_codec_peek_stream_info(&vpx_codec_vp8_dx_algo, data, length, &si);
if ((aKeyframeSkip && !si.is_kf) || (aKeyframeSkip && si.is_kf && tstamp_ms < aTimeThreshold)) {
aKeyframeSkip = PR_TRUE;
if (aKeyframeSkip && (!si.is_kf || tstamp_ms < aTimeThreshold)) {
// Skipping to next keyframe...
parsed++; // Assume 1 frame per chunk.
break;
continue;
}
if (aKeyframeSkip && si.is_kf) {