Bug 969289 - Treat the null image pointer as a muted frame. r=rillian

This commit is contained in:
Benjamin Chen 2014-02-10 11:22:03 +08:00
parent c4fb388ba8
commit 942c5f9fb9

View File

@ -246,13 +246,10 @@ void VP8TrackEncoder::PrepareMutedFrame()
nsresult VP8TrackEncoder::PrepareRawFrame(VideoChunk &aChunk)
{
if (aChunk.mFrame.GetForceBlack()) {
if (aChunk.mFrame.GetForceBlack() || aChunk.IsNull()) {
PrepareMutedFrame();
} else {
layers::Image* img = aChunk.mFrame.GetImage();
if (NS_WARN_IF(!img)) {
return NS_ERROR_NULL_POINTER;
}
ImageFormat format = img->GetFormat();
if (format != ImageFormat::PLANAR_YCBCR) {
VP8LOG("Unsupported video format\n");