AVAssetWriter unknown error

后端 未结 5 1751
暖寄归人
暖寄归人 2021-02-07 22:53

Am trying to create video from images using AVAssetWriter. Implemented code works fine most of time, but in random moments there is problem with writer



        
5条回答
  •  醉梦人生
    2021-02-07 23:45

    I was getting the same error when the image in my pixel buffer was not of the same width/height dimensions that the input pixel buffer adapter expects based on what you set the sourcePixelBufferAttributes to for(kCVPixelBufferWidthKey, kCVPixelBufferHeightKey). Make sure the pixel buffer has those same dimensions. In my case, my application was sometimes drawing a 1x1 image because I intended to draw a solid color image but I neglected to upscale that single-color pixel to the full size.

提交回复
热议问题