summaryrefslogtreecommitdiff
path: root/test/webm_video_source.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/webm_video_source.h')
-rw-r--r--test/webm_video_source.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/webm_video_source.h b/test/webm_video_source.h
index 11d3d234d..650bc52dc 100644
--- a/test/webm_video_source.h
+++ b/test/webm_video_source.h
@@ -69,6 +69,18 @@ class WebMVideoSource : public CompressedVideoSource {
}
}
+ void SeekToNextKeyFrame() {
+ ASSERT_TRUE(vpx_ctx_->file != NULL);
+ do {
+ const int status = webm_read_frame(webm_ctx_, &buf_, &buf_sz_, &buf_sz_);
+ ASSERT_GE(status, 0) << "webm_read_frame failed";
+ ++frame_;
+ if (status == 1) {
+ end_of_file_ = true;
+ }
+ } while (!webm_ctx_->is_key_frame && !end_of_file_);
+ }
+
virtual const uint8_t *cxdata() const {
return end_of_file_ ? NULL : buf_;
}