• Hirokazu Honda's avatar
    media/gpu/vaapiWrapper: Destroy pending buffers on failure of submitting buffers · 0f51a364
    Hirokazu Honda authored
    If VaapiWrapper continues executing SubmitBuffer() even after the
    previous SubmitBuffer() fails, VABuffers stored in a pending list
    will be submitted to a driver by vaRenderPicture(). Some of the
    submitted buffers might not be related to the current processing
    and therefore the processing will fails.
    We assume VaapiWrapper client stops using the VaapiWrapper and
    destroys it if SubmitBuffer() fails. Although this should be
    true, this CL makes sure that the pended VABuffers are not
    used for the next processing by destroying them within
    SubmitBuffer_Locked() on failure.
    
    Bug: b:175897723
    Test: vaapi_wrapper_unittest
    Change-Id: I24eaa5f94a00f69d18c2a2f1bda707e4ccb21c87
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612292
    Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
    Reviewed-by: default avatarAndres Calderon Jaramillo <andrescj@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#843408}
    0f51a364
vaapi_wrapper_unittest.cc 5.49 KB