Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5d82840740c54dca8ef43dccf2d716c0b79e5f49
      
https://github.com/WebKit/WebKit/commit/5d82840740c54dca8ef43dccf2d716c0b79e5f49
  Author: Jean-Yves Avenard <[email protected]>
  Date:   2025-06-05 (Thu, 05 Jun 2025)

  Changed paths:
    M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp
    M Source/WebCore/platform/graphics/TrackBuffer.cpp

  Log Message:
  -----------
  music.apple.com: some assets are not playing in Safari
https://bugs.webkit.org/show_bug.cgi?id=294067
rdar://152624427

Reviewed by Youenn Fablet.

Some content when demuxed yield a few audio frames on start that have
a duration of 0 and invalid pts/dts. The underlying issue is being tracked
in rdar://148824548.
We were using the timescale of the presentation time to speedup time operations;
when the timestamp is invalid, that timescale will be 0. Attempting to reduce
a fraction with a zero denominator would have caused an infinite loop and
causing the GPU process to hang.

For now, we drop those samples.

Manually tested to avoid the issue. It is unknown on how the content was
created as it's not technically supposed to exist. The bad samples were
returned by the SourceBufferParserAVFObjC's AVStreamDataParser, as such
reproducing content exhibiting the problem is difficult.

* Source/WebCore/platform/graphics/SourceBufferPrivate.cpp:
(WebCore::SourceBufferPrivate::processMediaSample): Handle the case where we
don't attempt to use the timescale of either the sample's presentationTime or
duration if they are invalid.
* Source/WebCore/platform/graphics/TrackBuffer.cpp:
(WebCore::roundTowardsTimeScaleWithRoundingMargin): Exit early if timescale 
provided is invalid
as it would have caused an infinite loop.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to