Error -12848 exporting AVComposition (kFigFormatReaderError_ParsingFailure)
Error -12848 exporting AVComposition (kFigFormatReaderError_ParsingFailure)
- Subject: Error -12848 exporting AVComposition (kFigFormatReaderError_ParsingFailure)
- From: Jens Alfke <email@hidden>
- Date: Thu, 07 May 2015 09:18:16 -0700
I’m getting errors [see below] when exporting an AVComposition (reading samples with an AVAssetReader and writing them to an AVAssetReaderAudioMixOutput.) This code’s been working for a while, but this specific composition includes a range from an MP3 file that’s triggering errors during the export process. Strangely, there are no errors when playing the composition, only exporting to a file.
The below error messages get logged to the Xcode console partway during the export process, and at the end it returns an equivalent NSError (with code -12848.) After the point of the error, a lot of the output audio goes silent.
I isolated the MP3 file that triggers the error; it’s been in my iTunes library for years and shown no problems before. I was able to work around the problem by converting it to AIFF with iTunes and then replacing the MP3 with the AIFF version in the AVComposition. But this code is something I’d like to release in an app, so I’ll need it to work with all audio files. Any idea how to prevent this from happening, or if it’s an OS bug, whether I should file a Radar?
—Jens
[20:39:04.340] FigAudioFileCursor_createSampleBuffer signalled err=-12848 (kFigFormatReaderError_ParsingFailure) (Unexpected zero actual packets) at /SourceCache/CoreMedia/CoreMedia-1562.235/Prototypes/FormatHandlers/FigFormatReader_AudioFile.c line 1220
[20:39:04.340] sgffr_useSampleCursorToCreateSampleBuffer signalled err=-12848 (err) (FigSampleCursorCreateSampleBuffer failed) at /SourceCache/CoreMedia/CoreMedia-1562.235/Prototypes/FormatHandlers/SampleGeneratorForFormatReader.c line 697
[20:39:04.340] audioMentorThreadForwardOrReversePlayback signalled err=-12848 (err) (FigSampleGeneratorCreateSampleBufferAtCursor failed) at /SourceCache/CoreMedia/CoreMedia-1562.235/Prototypes/FormatHandlers/AudioMentor.c line 1191
20:39:17.343‖ Reader finished!
[20:39:17.348] copyTrackMetadataWriterAndCopyOrReuseSerializer signalled err=-12780 (kFigFormatWriterError_InvalidParameter) (Invalid source format) at /SourceCache/CoreMedia/CoreMedia-1562.235/Prototypes/FormatHandlers/FigFormatWriter_QTMovie.c line 12812
<<< FFW_QT/ISO >>> transferTrackMetadata: Cannot get metadata writer for destFormat com.apple.itunes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden