NewMovieFromDataRef crashes when QT movie URL is not found

  • Hi,

    I am trying to open a movie using the NewMovieFromDataRef api. But if the
    movie URL is not found, I get a crash.
    This is happening on OSX10.6.3. QT version 7.6.3. Following is the test app
    that I tried. Is there any way/ api  to get around this crash ?.

    #include <stdio.h>

    #include <QuickTime/QuickTime.h>
    #include <QuickTime/Movies.h>

    int main (int argc, const char * argv[]) {
        Movie  m = NULL;
        Handle h = NULL;
        short id = 0;
        OSType outType;
        short flags = newMovieActive;

        EnterMovies();

        OSErr err = QTNewDataReferenceFromURLCFString(CFSTR("
    http://10.192.18.142/test.mov"),0,&h,&outType);
        NewMovieFromDataRef(&m,flags,&id,h,outType) ;

        ExitMovies();
        return 0;
    }
  • On 27 Apr 2010, at 7:12 AM, varaha murthy wrote:

    > I am trying to open a movie using the NewMovieFromDataRef api. But if the
    > movie URL is not found, I get a crash.
    > This is happening on OSX10.6.3. QT version 7.6.3. Following is the test app
    > that I tried. Is there any way/ api  to get around this crash ?.
    ...
    > OSErr err = QTNewDataReferenceFromURLCFString(CFSTR("
    > http://10.192.18.142/test.mov"),0,&h,&outType);
    > NewMovieFromDataRef(&m,flags,&id,h,outType) ;

    It has been more than 5 years (thank God) since I've had to deal with the QuickTime C API, so my question may be ignorant...

    You collect the error return from QTNewDataReferenceFromURLCFString(), but you don't check the error, or any of the return values. What happens when you do?

    In any event, this is a mailing list for discussion of development with the Cocoa application frameworks. The Quicktime-API list deals with the C API for QuickTime. All anyone here can do is read the documentation (which is appallingly bad, at least as supplied with Xcode 3.2) for you.

    — F
previous month april 2010 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today