Skip to content

Commit

Permalink
Cherry-pick 875db7c. rdar://122544744
Browse files Browse the repository at this point in the history
    [Cocoa] WebCodecs H264 decoder is not always reordering frames according presentation time
    https://bugs.webkit.org/show_bug.cgi?id=268987
    rdar://122544744

    Reviewed by Eric Carlson.

    We needed to loop until lower or equal than cpb_cnt_minus1 as per spec.
    Manually tested using https://w3c.github.io/webcodecs/samples/video-decode-display.

    * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter.cc:

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

Identifier: 272448.582@safari-7618-branch
  • Loading branch information
youennf authored and MyahCobbs committed Feb 21, 2024
1 parent 77fcf93 commit ff6fbf3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ class SpsAndVuiParser : private SpsParser {
// bit_rate_scale
// cpb_size_scale
reader.ConsumeBits(8);
for (size_t cptr = 0; cptr < cpb_cnt_minus1; ++cptr) {
for (size_t cptr = 0; cptr <= cpb_cnt_minus1; ++cptr) {
// bit_rate_value_minus1
reader.ReadExponentialGolomb();
// cpb_size_value_minus1
Expand Down

0 comments on commit ff6fbf3

Please sign in to comment.