Avios
Avios copied to clipboard
-12909 kVTVideoDecoderBadDataErr
First off thanks for this amazing library. It helped me reduce the complexity of my project by 20 fold. I have updated the code to work in Swift 5. I have successfully parsed the input stream of H264 data and fed it to the decode session. When I send the SPS and PPS information, I get the proper NoImage throw. But when I send the IDR frame or the CodedSlice I get -12909 error from the DecompSession.
To check, I printed out the NAL type after passing to the decode function, it prints out correctly the IDR and CodedSlice types. From the input stream after parsing the individual NAL units, I have stripped the header 00 00 00 01 and sent the rest to the decode function. Is this correct?
I also have this doubt that iOS requires the data in AVCC format (length code as header). Does the NAL class in your implementation handle this?
Please Guide! Thanks in Advance.
I found that your code handles the addition of the length header inside the NAL class when creating the block buffers. So since everything (SPS, PPS, IDR, CodedSlice) is getting detected correctly, is the error with the emulation prevention bytes? Do we have to remove them manually before sending to the decoder?