changeset 30869:22ec9cfbb129

Fix libmpcodecs/vd_qtvideo.c compilation on OS X: - Declare the "result" variable even for native QuickTime. - ExitMovies returns void; don't check its result value.
author sesse
date Tue, 16 Mar 2010 14:30:31 +0000
parents 418cbee8e099
children fc34860b15f1
files libmpcodecs/vd_qtvideo.c
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_qtvideo.c	Tue Mar 16 12:38:29 2010 +0000
+++ b/libmpcodecs/vd_qtvideo.c	Tue Mar 16 14:30:31 2010 +0000
@@ -59,7 +59,7 @@
 static    HMODULE handler;
 static    OSErr (*InitializeQTML)(long flags);
 static    OSErr (*EnterMovies)(void);
-static    OSErr (*ExitMovies)(void);
+static    void (*ExitMovies)(void);
 static    OSErr (*DecompressSequenceBegin)(ImageSequence *seqID,
                                            ImageDescriptionHandle desc,
                                            CGrafPtr port,
@@ -99,9 +99,7 @@
 
 // init driver
 static int init(sh_video_t *sh){
-#ifndef CONFIG_QUICKTIME
     OSErr result = 1;
-#endif
 
     if (sh->ImageDesc == NULL) {
         mp_msg(MSGT_DECVIDEO,MSGL_ERR,"sh->ImageDesc not set, cannot use binary QuickTime codecs (try -demuxer mov?)\n");
@@ -128,7 +126,7 @@
 
     InitializeQTML = (OSErr (*)(long))GetProcAddress(handler, "InitializeQTML");
     EnterMovies = (OSErr (*)(void))GetProcAddress(handler, "EnterMovies");
-    ExitMovies = (OSErr (*)(void))GetProcAddress(handler, "ExitMovies");
+    ExitMovies = (void (*)(void))GetProcAddress(handler, "ExitMovies");
     DecompressSequenceBegin = (OSErr (*)(ImageSequence*,ImageDescriptionHandle,CGrafPtr,void *,const Rect *,MatrixRecordPtr,short,RgnHandle,CodecFlags,CodecQ,DecompressorComponent))GetProcAddress(handler, "DecompressSequenceBegin");
     DecompressSequenceFrameS = (OSErr (*)(ImageSequence,Ptr,long,CodecFlags,CodecFlags*,ICMCompletionProcRecordPtr))GetProcAddress(handler, "DecompressSequenceFrameS");
     GetGWorldPixMap = (PixMapHandle (*)(GWorldPtr))GetProcAddress(handler, "GetGWorldPixMap");
@@ -254,8 +252,7 @@
         CDSequenceEnd(imageSeq);
         imageSeq = 0;
     }
-    result=ExitMovies();
-    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"ExitMovies returned %d\n",result);
+    ExitMovies();
 }
 
 // decode a frame