Bug 1492915 - Stop WebMDemuxer from inspecting partially encrypted packets for keyframe information. r=jya

Differential Revision: https://phabricator.services.mozilla.com/D6415

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Bryce Van Dyk 2018-09-21 15:58:13 +00:00
Родитель 83ea94f5ba
Коммит 8d1b27c4a2
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -672,11 +672,16 @@ WebMDemuxer::GetNextPacket(TrackInfo::TrackType aType,
if (aType == TrackInfo::kAudioTrack) {
isKeyframe = true;
} else if (aType == TrackInfo::kVideoTrack) {
if (packetEncryption == NESTEGG_PACKET_HAS_SIGNAL_BYTE_ENCRYPTED) {
if (packetEncryption == NESTEGG_PACKET_HAS_SIGNAL_BYTE_ENCRYPTED ||
packetEncryption == NESTEGG_PACKET_HAS_SIGNAL_BYTE_PARTITIONED) {
// Packet is encrypted, can't peek, use packet info
isKeyframe = nestegg_packet_has_keyframe(holder->Packet())
== NESTEGG_PACKET_HAS_KEYFRAME_TRUE;
} else {
MOZ_ASSERT(packetEncryption ==
NESTEGG_PACKET_HAS_SIGNAL_BYTE_UNENCRYPTED ||
packetEncryption == NESTEGG_PACKET_HAS_SIGNAL_BYTE_FALSE,
"Unencrypted packet expected");
auto sample = MakeSpan(data, length);
auto alphaSample = MakeSpan(alphaData, alphaLength);