Commit 4fc6b679 authored by Miguel Casas's avatar Miguel Casas Committed by Commit Bot

Vaapi decoder: reset |num_frames_at_client_| on surface set change

This CL resets |num_frames_at_client_| on surface set change to prevent
the previous state spilling over, as can be seen on e.g. [1] (trace
of crosvideo.appspot.com/?codec=vp9&cycle=true with two resolution
changes).

[1] https://i.imgur.com/wB7RI5V.png (https://imgur.com/a/eyhrbSq)

TBR=hiroh@chromium.org since the change is trivial and anyway
v_d_a_unit vp9 test work still on e.g. nocturne

Bug: 909926
Change-Id: Ifff5f2ec4538115320ea713b1b52709858da26a4
Reviewed-on: https://chromium-review.googlesource.com/c/1356898Reviewed-by: default avatarMiguel Casas <mcasas@chromium.org>
Reviewed-by: default avatarPawel Osciak <posciak@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612835}
parent 22e0542a
...@@ -550,6 +550,7 @@ void VaapiVideoDecodeAccelerator::TryFinishSurfaceSetChange() { ...@@ -550,6 +550,7 @@ void VaapiVideoDecodeAccelerator::TryFinishSurfaceSetChange() {
client_->DismissPictureBuffer(iter->first); client_->DismissPictureBuffer(iter->first);
} }
pictures_.clear(); pictures_.clear();
num_frames_at_client_ = 0;
// And ask for a new set as requested. // And ask for a new set as requested.
VLOGF(2) << "Requesting " << requested_num_pics_ VLOGF(2) << "Requesting " << requested_num_pics_
......
Markdown is supported
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