diff --git a/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp b/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp index 65363e99e53..6dff0d8f012 100644 --- a/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp +++ b/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp @@ -69,7 +69,10 @@ NS_IMETHODIMP nsGIFDecoder2::Init(imgIRequest *aRequest) mImageRequest = aRequest; mObserver = do_QueryInterface(aRequest); // we're holding 2 strong refs to the request. - aRequest->GetImage(getter_AddRefs(mImageContainer)); + mImageContainer = do_CreateInstance("@mozilla.org/image/container;1"); + aRequest->SetImage(mImageContainer); + + mImageContainer->StartAnimation(); /* do gif init stuff */ /* Always decode to 24 bit pixdepth */ diff --git a/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp b/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp index 70e98138135..389c693ae31 100644 --- a/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp +++ b/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp @@ -122,7 +122,8 @@ NS_IMETHODIMP nsJPEGDecoder::Init(imgIRequest *aRequest) mRequest = aRequest; mObserver = do_QueryInterface(mRequest); - aRequest->GetImage(getter_AddRefs(mImage)); + mImage = do_CreateInstance("@mozilla.org/image/container;1"); + aRequest->SetImage(mImage); /* We set up the normal JPEG error routines, then override error_exit. */ mInfo.err = jpeg_std_error(&mErr.pub); diff --git a/modules/libpr0n/decoders/png/nsPNGDecoder.cpp b/modules/libpr0n/decoders/png/nsPNGDecoder.cpp index e5985c184e2..070128da7ad 100644 --- a/modules/libpr0n/decoders/png/nsPNGDecoder.cpp +++ b/modules/libpr0n/decoders/png/nsPNGDecoder.cpp @@ -76,7 +76,8 @@ NS_IMETHODIMP nsPNGDecoder::Init(imgIRequest *aRequest) mRequest = aRequest; mObserver = do_QueryInterface(aRequest); // we're holding 2 strong refs to the request. - aRequest->GetImage(getter_AddRefs(mImage)); + mImage = do_CreateInstance("@mozilla.org/image/container;1"); + aRequest->SetImage(mImage); /* do png init stuff */ diff --git a/modules/libpr0n/decoders/ppm/nsPPMDecoder.cpp b/modules/libpr0n/decoders/ppm/nsPPMDecoder.cpp index 976551be7d3..aa0bbf9108e 100644 --- a/modules/libpr0n/decoders/ppm/nsPPMDecoder.cpp +++ b/modules/libpr0n/decoders/ppm/nsPPMDecoder.cpp @@ -62,7 +62,8 @@ NS_IMETHODIMP nsPPMDecoder::Init(imgIRequest *aRequest) mObserver = do_QueryInterface(aRequest); // we're holding 2 strong refs to the request. - aRequest->GetImage(getter_AddRefs(mImage)); + mImage = do_CreateInstance("@mozilla.org/image/container;1"); + aRequest->SetImage(mImage); mFrame = do_CreateInstance("@mozilla.org/gfx/image/frame;2"); if (!mFrame)