• Vasiliy Telezhnikov's avatar
    Fix RunAfterPendingVideoFrames before CreateVideoFrame · 51b64a4d
    Vasiliy Telezhnikov authored
    RunAfterPendingVideoFrames is used to make sure VideoFrameFactoryImpl
    pipeline is ordered and the callback is run after all pending
    CreateVideoFrame is done. For this purpose it RequestImage() with the
    same ImageSpec as last request and waits for request to complete.
    
    It is possible that RunAfterPendingVideoFrames is called before any
    CreateVideoFrame calls and so ImageSpec isn't initialized yet. This CL
    fixes this by skipping RequestImage() in this case, as there should be
    no pending CreateVideoFrame.
    
    Bug: 1099384
    Change-Id: I669718a8c470c1f0360a79c47317252025fdedd8
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2302410Reviewed-by: default avatarFrank Liberato <liberato@chromium.org>
    Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#791252}
    51b64a4d
video_frame_factory_impl.cc 15.3 KB