mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 10:10:41 +00:00
virtio: video: clear output resources when the output queue is cleared
Originally, we clear all the output resources when getting ProvidePictureBuffers command from VDA. At this point only VDA discards the output buffers. crosvm should keep the output resources until the output queue is cleared. Note that at crrev.com/c/2494602, GAVDA will ignore the output buffers after calling ProvidePictureBuffers(). So it's safe that crosvm passes the output buffers after getting ProvidePictureBuffers command. BUG=b:171442927 TEST=pass android.media.cts.AdaptivePlaybackTest#testVP9_adaptiveDrc Change-Id: I54dd364e7509c18fb3a3cd193da97dd107ceec44 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2494322 Tested-by: Chih-Yu Huang <akahuang@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Alexandre Courbot <acourbot@chromium.org> Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
This commit is contained in:
parent
efb2186785
commit
8ba5fc9819
1 changed files with 1 additions and 4 deletions
|
@ -261,9 +261,6 @@ impl Context {
|
||||||
// No need to set `frame_rate`, as it's only for the encoder.
|
// No need to set `frame_rate`, as it's only for the encoder.
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
// All the output buffers at VDA are dropped. Clear the output resources.
|
|
||||||
self.out_res = Default::default();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_picture_ready(
|
fn handle_picture_ready(
|
||||||
|
@ -745,7 +742,7 @@ impl<'a> Decoder<'a> {
|
||||||
session.reset().map_err(VideoError::VdaError)?;
|
session.reset().map_err(VideoError::VdaError)?;
|
||||||
}
|
}
|
||||||
QueueType::Output => {
|
QueueType::Output => {
|
||||||
ctx.out_res.queued_res_ids.clear();
|
ctx.out_res = Default::default();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in a new issue