0

I developed H264 player (most ideas are taken from How to use VideoToolbox to decompress H.264 video stream) and it worked on XCode 8.2.1 perfectly. But now I built the same project in XCode 9.2 and for iOS 11.2 SDK and it works in emulator but does not work on real device (iPad mini 2 with iOS 11.2.6) only partly - it decodes low bitrate videos(IDR slice size < 10 kB) but spits error -12909 and after 30-50 frames crashes on VTDecompressionSessionDecodeFrame()

Has anybody faced with this issue?

Timofey Konshin
  • 219
  • 2
  • 6

1 Answers1

0

After a week i found the cause of this issue. Looks like

CMBlockBufferCreateWithMemoryBlock works somethig different. When i manage memory block myself and call this method with

kCFAllocatorNull to avoid memory release, decoder fails. Even if i call decoding sicronously to guaranty that memory block valid during decoding.

So i added allocation and copy of memory block before call CMBlockBufferCreateWithMemoryBlock and pass nil instead kCFAllocatorNull to use default deallocator when memory block should be released.

Timofey Konshin
  • 219
  • 2
  • 6