Copy and destroy frames on encode()
This CL changes the behavior of VideoEncoder to make an internal copy of frames passed in through encode(), before destroying the passed frame. This means that users don't need to call destroy() after passing frames to encode(), which could result in a frame being invalidated before we send it to the internal encoder. It also means we can destroy the frame internally when we no longer need it without risking that it might still be in use by the user. Users that which to keep their frames alive after giving them to the encoder can send a cloned copy instead. Bug: 1108023 Change-Id: Ie5cd98d688a53314ac16a6a3ac7afe2a65d742f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363863 Commit-Queue: Thomas Guilbert <tguilbert@chromium.org> Reviewed-by:Dan Sanders <sandersd@chromium.org> Cr-Commit-Position: refs/heads/master@{#800296}
Showing
Please register or sign in to comment