From 9f3d1f4e1a5829ffbca2a2aeb5a002618cf66da7 Mon Sep 17 00:00:00 2001 From: Chris Pearce Date: Tue, 8 Sep 2009 10:23:11 +1200 Subject: [PATCH] Bug 514573 - Free video data after paint, prevents repainting. r=doublec --- content/media/ogg/nsOggDecoder.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/content/media/ogg/nsOggDecoder.cpp b/content/media/ogg/nsOggDecoder.cpp index b78119c72f96..2dac82e46f1b 100644 --- a/content/media/ogg/nsOggDecoder.cpp +++ b/content/media/ogg/nsOggDecoder.cpp @@ -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(); } }