Commit 30f58b52 authored by Adrian Grange's avatar Adrian Grange
Browse files

Added Reset method to TwopassStatsStore

The stats buffer needs to be reset between runs of the
encoder. I added a Reset() function to TwopassStatsStore
and called it at the beginning of each encode.

This enables us to run multiple encodes which was
previously not possible since there was no way to reset
the stats between runs.

Change-Id: Iebb18dab83ba9331f009f764cc858609738a27f9
parent 9704cdec
......@@ -126,6 +126,9 @@ void EncoderTest::RunLoop(VideoSource *video) {
vpx_codec_dec_cfg_t dec_cfg = {0};
for (unsigned int pass = 0; pass < passes_; pass++) {
last_pts_ = 0;
......@@ -65,6 +65,10 @@ class TwopassStatsStore {
return buf;
void Reset() {
std::string buffer_;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment