Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 248020847da1d5e6b9130d04b3ff4353efa29d2c
      
https://github.com/WebKit/WebKit/commit/248020847da1d5e6b9130d04b3ff4353efa29d2c
  Author: Youenn Fablet <youe...@gmail.com>
  Date:   2023-10-12 (Thu, 12 Oct 2023)

  Changed paths:
    M Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp
    M Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h

  Log Message:
  -----------
  keyFramesDecoded > 0 while framesDecoded == 0
https://bugs.webkit.org/show_bug.cgi?id=262972
rdar://116810102

Reviewed by Eric Carlson.

When creating a remote decoder, there is a small amount of time where the 
decoder does not have a connection.
We were previously returning an error, which would instruct libwebrtc backend 
to request a key frame.
Some services only provide SPS/PPS in the first frame and not the succeesive 
key frames.
When dropping the first frame with a missing connection, we would not be able 
to recover.

To prevent this, we store the frames to decode in a vector if the decoder does 
not have a connection.
When setting the connection, we then send all frames to the GPU process.

Manually tested.

* Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
(WebKit::sendFrameToDecode):
(WebKit::LibWebRTCCodecs::decodeFrame):
(WebKit::LibWebRTCCodecs::setDecoderConnection):
* Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h:

Canonical link: https://commits.webkit.org/269258@main


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to