SDL_UpdateTexture and NV12 |
rodebiet
|
I had the same problem. I have a solution that works, but it involves a memcpy. I hope to find a zero-copy method.
You have to allocate some memory to store the Y and the UV plane together. After the frame is finished with avcodec_receive_frame, you memcpy the Y plane to the allocated memory, and the memcpy the UV plane tot the allocated memory, right after the Y plane. Then you do a SDL_UpdateTexture and pass the point to the allocated memory and frame->linesize[0]. That works, but again, I hate the memcpys. |
|||||||||||
|