Changeset 745
- Timestamp:
- 11/27/07 13:04:10 (9 months ago)
- Files:
-
- branches/perian-1.1/ff_MovieImport.c (modified) (7 diffs)
- branches/perian-1.1/ff_dataref.c (modified) (2 diffs)
- branches/perian-1.1/ff_private.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/perian-1.1/ff_MovieImport.c
r742 r745 339 339 uint8_t buf[PROBE_BUF_SIZE]; 340 340 AVProbeData *pd = (AVProbeData *)malloc(sizeof(AVProbeData)); 341 ByteIOContext byteContext;341 ByteIOContext *byteContext; 342 342 343 343 /* default */ … … 364 364 if (IS_AVI(storage->componentType)) { 365 365 /* Prepare the iocontext structure */ 366 memset(&byteContext, 0, sizeof(byteContext));367 366 result = url_open_dataref(&byteContext, dataRef, dataRefType, NULL, NULL, NULL); 368 367 require_noerr(result, bail); 369 368 370 OSType fourcc = get_avi_strf_fourcc( &byteContext);369 OSType fourcc = get_avi_strf_fourcc(byteContext); 371 370 enum CodecID id = codec_get_id(codec_bmp_tags, BSWAP(fourcc)); 372 371 … … 374 373 *valid = 0; 375 374 376 url_fclose( &byteContext);375 url_fclose(byteContext); 377 376 } 378 377 } … … 420 419 { 421 420 ComponentResult result = noErr; 422 ByteIOContext byteContext;421 ByteIOContext *byteContext; 423 422 AVFormatContext *ic = NULL; 424 423 AVFormatParameters params; … … 437 436 438 437 /* Prepare the iocontext structure */ 439 memset(&byteContext, 0, sizeof(byteContext));440 438 result = url_open_dataref(&byteContext, dataRef, dataRefType, &storage->dataHandler, &storage->dataHandlerSupportsWideOffsets, &storage->dataSize); 441 439 storage->isStreamed = dataRefType == URLDataHandlerSubType; … … 444 442 /* Open the Format Context */ 445 443 memset(¶ms, 0, sizeof(params)); 446 result = av_open_input_stream(&ic, &byteContext, "", storage->format, ¶ms);444 result = av_open_input_stream(&ic, byteContext, "", storage->format, ¶ms); 447 445 require_noerr(result,bail); 448 446 storage->format_context = ic; … … 555 553 else 556 554 storage->movieLoadState == kMovieLoadStateError; 557 555 558 556 return result; 559 557 } /* FFAvi_MovieImportDataRef */ branches/perian-1.1/ff_dataref.c
r703 r745 199 199 200 200 /* This is the public function to open bytecontext withs datarefs */ 201 OSStatus url_open_dataref(ByteIOContext * pb, Handle dataRef, OSType dataRefType, DataHandler *dataHandler, Boolean *wideSupport, int64_t *dataSize)201 OSStatus url_open_dataref(ByteIOContext **pb, Handle dataRef, OSType dataRefType, DataHandler *dataHandler, Boolean *wideSupport, int64_t *dataSize) 202 202 { 203 203 URLContext *uc; … … 217 217 return err; 218 218 } 219 uc->filename [0] = '\0';219 uc->filename = NULL; 220 220 uc->prot = up; 221 221 uc->flags = URL_RDONLY; // we're just using the read access... branches/perian-1.1/ff_private.h
r716 r745 93 93 94 94 /* Public interface of the DataRef interface */ 95 OSStatus url_open_dataref(ByteIOContext * pb, Handle dataRef, OSType dataRefType, DataHandler *dataHandler, Boolean *wideSupport, int64_t *dataSize);95 OSStatus url_open_dataref(ByteIOContext **pb, Handle dataRef, OSType dataRefType, DataHandler *dataHandler, Boolean *wideSupport, int64_t *dataSize); 96 96 97 97 /* Import routines */
