• Alexandre Courbot's avatar
    media/gpu/v4l2vda: Fix buffers assignment sequence. · d87cc312
    Alexandre Courbot authored
    CL 1170707 has introduced an issue when we disable rendering on the VDA
    unittest: ImportBufferForPictureTask() would be called from
    AssignPictureBuffersTask() while buffers were still in the free list,
    resulting in EnqueueOutputRecord() trying to enqueue buffers that had
    still not received a picture ID.
    
    Fix this by first acquiring all buffers, before iterating on them and
    calling ImportBufferForPictureTask().
    
    BUG=890656
    TEST=Checked the VDA unittest passed on Hana and Cheza, with rendering
    both disabled and enabled.
    
    Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
    Change-Id: Ied75af6d4503ff5e57b1b6bc9d2a0e1d3c2fca89
    Reviewed-on: https://chromium-review.googlesource.com/1252228Reviewed-by: default avatarPawel Osciak <posciak@chromium.org>
    Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#595383}
    d87cc312
v4l2_video_decode_accelerator.cc 90.9 KB