0

I use the Video tool box, to decode h264 data on IOS8.x. When this code run on IOS 9.x, I got a memory leak every time I call VTDecompressionSessionDecodeFrame, and I can't see any memory leak in Instruments tool!

here is the code: https://github.com/stevenyao/iOSHardwareDecoder

miguelbgouveia
  • 2,963
  • 6
  • 29
  • 48
xiao
  • 1
  • 1

1 Answers1

0

I was seeing a memory leak on device when processing the hardware decoded frame in a background thread, but I then copied the YUV frame to a BGRA frame via CoreImage and then passed the BGRA frame back to the main thread so that it could be turned into a UIImage. At that point, the leak went away.

MoDJ
  • 4,309
  • 2
  • 30
  • 65