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

Get Crash about AVAssetReaderTrackOutput #8

Open
icefox57 opened this issue Feb 11, 2023 · 2 comments
Open

Get Crash about AVAssetReaderTrackOutput #8

icefox57 opened this issue Feb 11, 2023 · 2 comments

Comments

@icefox57
Copy link

icefox57 commented Feb 11, 2023

image

2 kind of crash

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '*** -[AVAssetReaderTrackOutput copyNextSampleBuffer] cannot copy next sample buffer before adding this output to an instance of AVAssetReader (using -addOutput:) and calling -startReading on that asset reader'

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '*** -[AVAssetReader startReading] cannot be called again after reading has already started'
terminating with uncaught exception of type NSException

@ThuTruongMinu
Copy link

Hi. I'm having the same issue. Have you found any solutions?

@nahn20
Copy link

nahn20 commented Dec 18, 2023

I believe it's an issue having to do with concurrency, and multiple calls to addAssetID sharing the same audioReader, videoReader, and assetWriter. I fixed this by moving those three variables into the top of addAssetID (and cleaning up all references to self. for each of them).

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

3 participants