• Alexandre Courbot's avatar
    media/gpu/v4l2(s)vda: stop accessing device members from child thread · 6564ee9d
    Alexandre Courbot authored
    The V4L2 device members are currently accessed in the GL/EGL image
    creation method, which runs on the child thread. But these members
    belong to the decoder thread and are not thread-safe.
    
    Fix this by passing the device used to create the GL/EGL image to the
    creation method. That way the member is accessed from the decoder
    thread, and the only thing that happens in the child thread is the call
    to V4L2Device::Create(E)GLImage, which is supposed to take place there.
    
    BUG=None
    TEST=video.Seek.switch_vp8 passing on Kevin.
    TEST=video.Seek.switch_vp8 passing on Hana.
    TEST=video.Seek.switch_h264 passing on Krane.
    
    Change-Id: Ie94745c1215989db77e85896ac1fda69cf43a080
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2026853
    Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
    Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
    Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#739388}
    6564ee9d
v4l2_video_decode_accelerator.h 24.8 KB