Bug 514573 - Free video data after paint, prevents repainting. r=doublec

This commit is contained in:
Chris Pearce 2009-09-08 10:23:11 +12:00
Родитель 8d783e47e7
Коммит 9f3d1f4e1a
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -154,9 +154,13 @@ public:
~FrameData()
{
MOZ_COUNT_DTOR(FrameData);
ClearVideoHeader();
}
void ClearVideoHeader() {
if (mVideoHeader) {
oggplay_callback_info_unlock_item(mVideoHeader);
mVideoHeader = nsnull;
}
}
@ -997,6 +1001,9 @@ void nsOggDecodeStateMachine::PlayVideo(FrameData* aFrame)
mDecoder->SetRGBData(aFrame->mVideoWidth, aFrame->mVideoHeight,
mFramerate, mAspectRatio, buffer.forget());
// Don't play the frame's video data more than once.
aFrame->ClearVideoHeader();
}
}