Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AVF Batch Exporter crash on Catalina in certain situation (and proposed fix) #32

Open
TimoRozendal opened this issue Jun 10, 2020 · 0 comments

Comments

@TimoRozendal
Copy link

We recommend our (EboSuite) users to use the AVF Batch Exporter and some of our users had crashes while converting (as I understood) all the files they tried after upgrading to Catalina.

This was the error mentioned in the crash log:

Crashed Thread:        1  Dispatch queue: VVAVFTranscoder

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVAssetWriterInput appendSampleBuffer:] Cannot append sample buffer: First input buffer must have an appropriate kCMSampleBufferAttachmentKey_TrimDurationAtStart since the codec has encoder delay'
abort() called
terminating with uncaught exception of type NSException

The odd thing is that we initially couldn't reproduce it on Mojave and also not on the first Catalina machine we tried, but later could using another machine (testing all the time with the same file that one user provided as a test). I don't understand how this could happen, but well..

I managed to fix this crash by adding a few lines in VVAVTranscoder.m . I check if the first buffer returned for each track has TrimDurationAtStart key and if not I add it (using the asset's duration as time). This fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant