commit 631da416a698df58d9253c5e77c4103ae83bd433
parent 5b981937407092d5c5671ea41980709fea5fcc6d
Author: John Lin <jolin@mozilla.com>
Date: Mon, 15 Dec 2025 23:15:55 +0000
Bug 1981503 - handle HEVC out-of-band config change. r=media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D276499
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/dom/media/platforms/wrappers/MediaChangeMonitor.cpp b/dom/media/platforms/wrappers/MediaChangeMonitor.cpp
@@ -337,9 +337,14 @@ class HEVCChangeMonitor : public MediaChangeMonitor::CodecChangeMonitor {
aSample->mKeyframe || !mSPS.IsEmpty()
? H265::ExtractHVCCExtraData(aSample)
: nullptr;
+ if (!extraData || extraData->IsEmpty()) {
+ // No inband parameter set in sample bitstream. Try out-of-band extradata.
+ extraData = aSample->mExtraData;
+ }
// Sample doesn't contain any SPS and we already have SPS, do nothing.
auto curConfig = HVCCConfig::Parse(mCurrentConfig.mExtraData);
if ((!extraData || extraData->IsEmpty()) && curConfig.unwrap().HasSPS()) {
+ LOG("No SPS in sample. Use existing config");
return NS_OK;
}