PDA

View Full Version : Problem with QMovie



yellowmat
30th March 2006, 10:01
Hi !

I'm trying to use a QMovie object to dislpay animation files ith extension .mng.

I First tryed without using double buffering. Here is a part of my code implemented in a SLOT connected using the QMovie::connectStatus function :


case(QMovie::EndOfFrame):
frame->setPixmap(movie->framePixmap());
break;


As the result was flicker, I decided to use double buffering. Here is the updated code (in the smae function) :


case(QMovie::EndOfFrame):
{
QPixmap pix(movie->framePixmap());
QRect rect(0, 0, pix.width(), pix.height());
bitBlt(frame, rect.topLeft(), &pix, rect);
}
break;


I have two problems :
1. When trying to display big animations the first frame is displayed partially and the others are not displayed, and I can read in the debug traces the following message :

MNG error 11: (null); chunk IDAT; subcode 0:0
So what's wrong ?

2. In order to display big animations, I tryed to use a small one and then to resize it, but the result is not the one I expected : the pixmap size is resized but its content is not stretch, why ?

Thanks in advance.

yellowmat
30th March 2006, 10:09
I also have another problem, sometimes my program crashes due to an Access Violation in MSVCRT.DLL, someone could help me to find out why ?

Kapil
30th March 2006, 10:28
I also have another problem, sometimes my program crashes due to an Access Violation in MSVCRT.DLL, someone could help me to find out why ?


One possible cause of this error is that the application has written past the block of memory that is owned by a particular object. The small-block heapmemory manager that ships with the Visual C++ 6.0 run-time libraries incorporates heap control structures within the small-block heap. Overwriting the memory block changes small-block heap pointer addresses, effecting a bad pointer and possibly a fault in Msvcrt.dll when the pointer is referenced.

MAke sure that the memory allocated is greater than the size of the object...