mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Issue #2357 - WebM demuxer can't tell when a video wants to be transparent.
Required to have an alpha channel (which in the strange world of graphics seems to refer to transparency, and not experimental code) in WebM videos. Straight port of Firefox 53 implementation, adapted slightly for a couple of patches previously taken without this. Ref: BZ 1320829
This commit is contained in:
parent
ef54fc458c
commit
71cc0ef940
5 changed files with 66 additions and 6 deletions
|
|
@ -340,6 +340,15 @@ MediaRawData::MediaRawData(const uint8_t* aData, size_t aSize)
|
|||
{
|
||||
}
|
||||
|
||||
MediaRawData::MediaRawData(const uint8_t* aData, size_t aSize,
|
||||
const uint8_t* aAlphaData, size_t aAlphaSize)
|
||||
: MediaData(RAW_DATA, 0)
|
||||
, mCrypto(mCryptoInternal)
|
||||
, mBuffer(aData, aSize)
|
||||
, mAlphaBuffer(aAlphaData, aAlphaSize)
|
||||
{
|
||||
}
|
||||
|
||||
already_AddRefed<MediaRawData>
|
||||
MediaRawData::Clone() const
|
||||
{
|
||||
|
|
@ -356,6 +365,9 @@ MediaRawData::Clone() const
|
|||
if (!s->mBuffer.Append(mBuffer.Data(), mBuffer.Length())) {
|
||||
return nullptr;
|
||||
}
|
||||
if (!s->mAlphaBuffer.Append(mAlphaBuffer.Data(), mAlphaBuffer.Length())) {
|
||||
return nullptr;
|
||||
}
|
||||
return s.forget();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue