morgan pushed to branch base-browser-128.8.0esr-14.5-1 at The Tor Project / Applications / Tor Browser
Commits:
- 
2aa78353
by John Lin at 2025-03-10T14:20:42+00:00
 
1 changed file:
Changes:
| ... | ... | @@ -42,6 +42,14 @@ class H264ChangeMonitor : public MediaChangeMonitor::CodecChangeMonitor { | 
| 42 | 42 |        : mCurrentConfig(aInfo), mFullParsing(aFullParsing) {
 | 
| 43 | 43 |      if (CanBeInstantiated()) {
 | 
| 44 | 44 |        UpdateConfigFromExtraData(aInfo.mExtraData);
 | 
| 45 | +      auto avcc = AVCCConfig::Parse(mCurrentConfig.mExtraData);
 | 
|
| 46 | +      if (avcc.isOk() && avcc.unwrap().NALUSize() != 4) {
 | 
|
| 47 | +        // `CheckForChange()` will use `AnnexB::ConvertSampleToAVCC()` to change
 | 
|
| 48 | +        // NAL units into 4-byte.
 | 
|
| 49 | +        // `AVCDecoderConfigurationRecord.lengthSizeMinusOne` in the config
 | 
|
| 50 | +        // should be modified too.
 | 
|
| 51 | +        mCurrentConfig.mExtraData->ReplaceElementAt(4, 0xfc | 3);
 | 
|
| 52 | +      }
 | 
|
| 45 | 53 |      }
 | 
| 46 | 54 |    }
 | 
| 47 | 55 |