Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

StartMovie crash



Hi,

I have a weird problem with a movie playing loop.
Basically, what I do is this:

MovieController gMC = NewMovieController(myMovie, &theRect, mcNotVisible);
GoToBeginningOfMovie(myMovie);

while(repeat) {
StartMovie(myMovie);
while( !done && !IsMovieDone(myMovie) ) {
if(NULL != WaitNextEvent(updateMask, &theEvent, 1, NULL)) {
BeginUpdate(movieWindow);
if(!MCIsPlayerEvent(gMC, &theEvent)) { // mc did not handle it
switch (theEvent.what)
{
case updateEvt:
if(movieWindow == (WindowRef)theEvent.message) {
EraseRect (&theRect);
}
break;
}
} else {
}
EndUpdate(movieWindow);
} else {
}


MCIdle(gMC);
}
BeginUpdate(movieWindow);
EraseRect(&theRect);
EndUpdate(movieWindow);

StopMovie(myMovie);
GoToBeginningOfMovie(myMovie);
}
DisposeMovieController(gMC);

The loop is fine.
The thing is, I have to stop the playing, and start it again later.

So what I do is calling StopMovie(myMovie) from somwhere else and set done to true.
This goes fine, as well. The movie stops, the function exits, no error code is returned.

Next thing I do is call the above function again when I need to resume playing.
And there, I hit a problem: the app crashes systematically on StartMovie (with no error reported on GetMoviesError(), error codes, whatever) with the following backtrace.

#0 0x8b0d1efc in getNewSequence ()
#1 0x8b0d3060 in VideoPreRollComplete ()
#2 0x90282508 in CallComponentFunctionCommon ()
#3 0x8b0cd124 in VideoComponentDispatch ()
#4 0x90281290 in CallComponent ()
#5 0x91becb28 in MediaPreRollComplete ()
#6 0x91becab0 in prerollMedia ()
#7 0x91bc9b70 in InvokeForEachMediaUPP ()
#8 0x91bca38c in ForEachMedia_priv ()
#9 0x91c4de48 in PrivatePrerollMovie_priv ()
#10 0x91c47270 in StartMovie_priv ()

I know I should be using mcDoAction instead of StartMovie, but it has a somewhat similar crash at the similar point in time. Besides, since the controller is invisible, I don't have any graphical status to update.

Does it mean I have to dispose the movie and reload it each and every time I stop the playing and restart it?

--------------------
Nicolas Zinovieff
--------------------
_______________________________________________
quicktime-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/quicktime-api
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.