Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
AddMediaSample and memSCErr
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AddMediaSample and memSCErr



I'm writing a movie importer component, and as part of stress testing,
need to convert an extremely long input file. I now have a reproducible
case where AddMediaSample() returns a memSCErr (size check failed)
adding sample #6673.

Under OS9, this would generally indicate a memory corruption: fire up
Spotlight on my standalone tester, wait an hour, and find what's being
overwritten. Unfortunately, a similar tool like mallocDebug would not
catch the bug under OSX because it appears to be overwriting a Memory
Manager data structure and not outside an allocated block.

So I move to binary partitioning and it seems that it's NOT an overwrite
issue but a problem with the length of my data:

  -- Neither the GWorld pixel buffer or compressed pixel buffer show
     any over- or underruns preceding the call.

  -- If I skip that sample, the next AddMediaSample call fails.

  -- If I add each media sample TWICE, AddMediaSample fails on frame
     #3326, approximately halfway to the supposedly corrupt frame.

  -- If I skip EVERY OTHER media sample, it successfully adds frame
     #6673 but fails at a frame about twice as far along.

This appears to me that AddMediaSample() is failing, not due to memory
corruption, but because the media I'm creating is too large. Indeed, if
I count the bytes I'm adding to the media, they always seem to be just
shy of 1GB before failing.

My next thought was to try using AddMediaSample2(), which allow for
64-bit time offsets (though not longer data), but it fails similarly.

Google searches on memSCErr and other relevant symbols find no hits.

PowerMac G5 / 10.4.8 / QuickTime 7.1.3.

Any suggestions?

Matt Slot / Bitwise Operator / Ambrosia Software, Inc.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.