зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1168674: [ogg] P4. Skip over header packets when seeking close to the start. r=brion+1012
MozReview-Commit-ID: F0Ezo0yfOyo --HG-- extra : rebase_source : aac013a5b6065efed696e9929c63789f72ee1f5d
This commit is contained in:
Родитель
7f2fa5c20a
Коммит
928589a0d1
|
@ -862,11 +862,23 @@ RefPtr<MediaRawData>
|
|||
OggDemuxer::GetNextPacket(TrackInfo::TrackType aType)
|
||||
{
|
||||
OggCodecState* state = GetTrackCodecState(aType);
|
||||
DemuxUntilPacketAvailable(state);
|
||||
ogg_packet* packet = nullptr;
|
||||
|
||||
do {
|
||||
if (packet) {
|
||||
OggCodecState::ReleasePacket(state->PacketOut());
|
||||
}
|
||||
DemuxUntilPacketAvailable(state);
|
||||
|
||||
packet = state->PacketPeek();
|
||||
} while (packet && state->IsHeader(packet));
|
||||
|
||||
if (!packet) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Check the eos state in case we need to look for chained streams.
|
||||
ogg_packet* packet = state->PacketPeek();
|
||||
bool eos = packet && packet->e_o_s;
|
||||
bool eos = packet->e_o_s;
|
||||
|
||||
RefPtr<MediaRawData> data = state->PacketOutAsMediaRawData();;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче