mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-28 11:28:38 +00:00
Bug 571208 - Fix crash in nestegg_free_packet. Only push non-NULL packets into packet queue. r=chris.double
This commit is contained in:
parent
98d3104c6f
commit
d562484ebd
@ -531,14 +531,13 @@ PRBool nsWebMReader::DecodeVideoFrame(PRBool &aKeyframeSkip,
|
||||
nestegg_free_packet(next_packet);
|
||||
return PR_FALSE;
|
||||
}
|
||||
mVideoPackets.PushFront(next_packet);
|
||||
} else {
|
||||
r = nestegg_duration(mContext, &next_tstamp);
|
||||
if (r == -1) {
|
||||
nestegg_free_packet(next_packet);
|
||||
return PR_FALSE;
|
||||
}
|
||||
}
|
||||
mVideoPackets.PushFront(next_packet);
|
||||
}
|
||||
|
||||
PRInt64 tstamp_ms = tstamp / NS_PER_MS;
|
||||
|
@ -74,10 +74,12 @@ class PacketQueue : private nsDeque {
|
||||
}
|
||||
|
||||
inline void Push(nestegg_packet* aItem) {
|
||||
NS_ASSERTION(aItem, "NULL pushed to PacketQueue");
|
||||
nsDeque::Push(aItem);
|
||||
}
|
||||
|
||||
inline void PushFront(nestegg_packet* aItem) {
|
||||
NS_ASSERTION(aItem, "NULL pushed to PacketQueue");
|
||||
nsDeque::PushFront(aItem);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user