mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-06-07 17:09:07 +00:00
Refcount NesteggPacketHolder
Also move WebM code away from nsDeque.
This commit is contained in:
@@ -97,7 +97,7 @@ SoftwareWebMVideoDecoder::DecodeVideoFrame(bool &aKeyframeSkip,
|
||||
// stats counters using the AutoNotifyDecoded stack-based class.
|
||||
AbstractMediaDecoder::AutoNotifyDecoded a(mReader->GetDecoder());
|
||||
|
||||
nsAutoRef<NesteggPacketHolder> holder(mReader->NextPacket(WebMReader::VIDEO));
|
||||
nsRefPtr<NesteggPacketHolder> holder(mReader->NextPacket(WebMReader::VIDEO));
|
||||
if (!holder) {
|
||||
return false;
|
||||
}
|
||||
@@ -126,13 +126,13 @@ SoftwareWebMVideoDecoder::DecodeVideoFrame(bool &aKeyframeSkip,
|
||||
// end of the resource, use the file's duration as the end time of this
|
||||
// video frame.
|
||||
uint64_t next_tstamp = 0;
|
||||
nsAutoRef<NesteggPacketHolder> next_holder(mReader->NextPacket(WebMReader::VIDEO));
|
||||
nsRefPtr<NesteggPacketHolder> next_holder(mReader->NextPacket(WebMReader::VIDEO));
|
||||
if (next_holder) {
|
||||
r = nestegg_packet_tstamp(next_holder->mPacket, &next_tstamp);
|
||||
if (r == -1) {
|
||||
return false;
|
||||
}
|
||||
mReader->PushVideoPacket(next_holder.disown());
|
||||
mReader->PushVideoPacket(next_holder.forget());
|
||||
} else {
|
||||
next_tstamp = tstamp;
|
||||
next_tstamp += tstamp - mReader->GetLastVideoFrameTime();
|
||||
|
||||
Reference in New Issue
Block a user