Changeset 754

Show
Ignore:
Timestamp:
12/20/07 16:52:07 (7 months ago)
Author:
gbooker
Message:

Execute LSOpenFSRef since some people have broken installations that can't launch the update checker properly
Not tested yet

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/perian-1.1/FFusionCodec.c

    r749 r754  
    4141#include "FrameBuffer.h" 
    4242#include "CommonUtils.h" 
     43#include "pthread.h" 
    4344 
    4445void inline swapFrame(AVFrame * *a, AVFrame * *b) 
     
    164165#include <QuickTime/ComponentDispatchHelper.c> 
    165166 
     167void *launchUpdateChecker(void *args) 
     168{ 
     169        FSRef *ref = (FSRef *)args; 
     170    LSOpenFSRef(ref, NULL); 
     171        free(ref); 
     172        return NULL; 
     173} 
     174 
    166175void FFusionRunUpdateCheck() 
    167176{ 
     
    181190     
    182191    char fileRep[1024]; 
    183     FSRef updateCheckRef
     192    FSRef *updateCheckRef = malloc(sizeof(FSRef))
    184193    Boolean doCheck = FALSE; 
    185194     
    186195    if(CFStringGetFileSystemRepresentation(location, fileRep, 1024)) 
    187         if(FSPathMakeRef((UInt8 *)fileRep, &updateCheckRef, NULL) == noErr) 
     196        if(FSPathMakeRef((UInt8 *)fileRep, updateCheckRef, NULL) == noErr) 
    188197            doCheck = TRUE; 
    189198     
     
    193202        CFStringRef absLocation = CFSTR("/Library/PreferencePanes/Perian.prefPane/Contents/Resources/PerianUpdateChecker.app"); 
    194203        if(CFStringGetFileSystemRepresentation(absLocation, fileRep, 1024)) 
    195             if(FSPathMakeRef((UInt8 *)fileRep, &updateCheckRef, NULL) != noErr) 
     204            if(FSPathMakeRef((UInt8 *)fileRep, updateCheckRef, NULL) != noErr) 
    196205                return;  //We have failed 
    197206    } 
    198      
    199     LSOpenFSRef(&updateCheckRef, NULL);     
     207        pthread_t thread; 
     208        pthread_create(&thread, NULL, launchUpdateChecker, updateCheckRef); 
    200209} 
    201210