• scherkus's avatar
    Fix potential deadlock between Pipeline and VideoRendererImpl. · 0abb8499
    scherkus authored
    I don't believe we hit this in practice since the two lock acquiring
    sequences we make happen as separate tasks executed on the same
    thread.
    
    To summarize the ThreadSanitizer warning:
      - Task A acquires VideoRendererImpl -> Pipeline lock via
        FrameReady() -> GetMediaDuration()
      - Task B acquires Pipeline -> VideoRendererImpl lock via
        DoStop() -> ~VideoRendererImpl()
    
    Solution: don't hold onto the Pipeline lock when destroying renderers.
    
    BUG=412097
    
    Review URL: https://codereview.chromium.org/557603002
    
    Cr-Commit-Position: refs/heads/master@{#293890}
    0abb8499
pipeline.cc 20.7 KB