Changeset 781

Show
Ignore:
Timestamp:
01/20/08 17:38:59 (9 months ago)
Author:
astrange
Message:

Disable a flag that makes QT crash in some avis. Add cleaner error handling for AVCHD.

Files:

Legend:

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

    r756 r781  
    429429                cap->subCodecSupportsOutOfOrderDisplayTimes = true; 
    430430                cap->baseCodecShouldCallDecodeBandForAllFrames = true; 
    431               cap->subCodecSupportsScheduledBackwardsPlaybackWithDifferenceFrames = true; 
     431        //    cap->subCodecSupportsScheduledBackwardsPlaybackWithDifferenceFrames = true; 
    432432                 
    433433        //  XXX enabling this seems to cause rare visible artifacts in h.264? 
     
    459459        long count = 0; 
    460460        Handle imgDescExt; 
     461        OSErr err = noErr; 
    461462         
    462463    // We first open libavcodec library and the codec corresponding 
     
    687688                // specifically PAFF + spatial prediction 
    688689                if (codecID == CODEC_ID_H264 && ffusionIsParsedVideoInterlaced(glob->begin.parser)) 
    689                         goto error
     690                        err = featureUnsupported
    690691                 
    691692                // some hooks into ffmpeg's buffer allocation to get frames in  
     
    704705            Codecprintf(glob->fileLog, "Error opening avcodec!\n"); 
    705706             
    706             goto error; 
     707                       err = paramErr; 
    707708        } 
    708709                 
     
    747748    index = 0; 
    748749         
     750        if (!err) { 
    749751        switch (glob->avContext->pix_fmt) 
    750752        { 
     
    767769                        break; 
    768770        } 
     771        } 
    769772     
    770773    pos[index++] = 0; 
     
    782785        capabilities->flags |= codecCanAsync | codecCanAsyncWhen; 
    783786         
    784      
    785     return noErr; 
    786          
    787 error: 
    788         HLock(glob->pixelTypes); 
    789     pos = *((OSType **)glob->pixelTypes); 
    790         *pos = 0; 
    791         p->wantedDestinationPixelTypes = (OSType **)glob->pixelTypes; 
    792         HUnlock(glob->pixelTypes); 
    793          
    794         return -2; 
     787    return err; 
    795788} 
    796789