Bug 1611622 - Allow nil packets in OGG demuxer. r=bryce

Differential Revision: https://phabricator.services.mozilla.com/D71349
This commit is contained in:
Paul Adenot 2020-04-21 09:30:27 +00:00
parent 115a8d5dfa
commit 428794fe58

View File

@ -1424,7 +1424,8 @@ RefPtr<MediaRawData> OggTrackDemuxer::NextSample() {
bool eos = packet->e_o_s;
OggCodecState* state = mParent->GetTrackCodecState(mType);
RefPtr<MediaRawData> data = state->PacketOutAsMediaRawData();
if (!data) {
// ogg allows 'nil' packets, that are EOS and of size 0.
if (!data || (data->mEOS && data->Size() == 0)) {
return nullptr;
}
if (mType == TrackInfo::kAudioTrack) {