Bug 580531 - Handle multiple frames per chunk per packet in WebM playback statistics. r=kinetik
authorChris Pearce <chris@pearce.org.nz>
Thu, 24 Mar 2011 11:28:57 +1300
changeset 63613 3263ffab7ce792802105666a622795629cc044da
parent 63612 d6f8aff170a0e948bb1d437f57189faa70469937
child 63614 48a74f63565e4649230add851d06a5bbc5122a60
push id19247
push usercpearce@mozilla.com
push dateWed, 23 Mar 2011 22:39:37 +0000
treeherdermozilla-central@4902d72f6072 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik
bugs580531
milestone2.2a1pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 580531 - Handle multiple frames per chunk per packet in WebM playback statistics. r=kinetik
content/media/webm/nsWebMReader.cpp
--- a/content/media/webm/nsWebMReader.cpp
+++ b/content/media/webm/nsWebMReader.cpp
@@ -678,20 +678,20 @@ PRBool nsWebMReader::DecodeVideoFrame(PR
     if (r == -1) {
       return PR_FALSE;
     }
 
     vpx_codec_stream_info_t si;
     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) {
       aKeyframeSkip = PR_FALSE;
     }
 
     if (vpx_codec_decode(&mVP8, data, length, NULL, 0)) {
       return PR_FALSE;