Skip to content

Commit

Permalink
[Cocoa] WebCodecs H264 decoder is not always reordering frames accord…
Browse files Browse the repository at this point in the history
…ing 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
  • Loading branch information
youennf committed Feb 9, 2024
1 parent f506ead commit 875db7c
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 875db7c

Please sign in to comment.