Given a pointer to an AVFrame from FFMPEG's avcodec_decode_video
() function how do I copy the image to a DirectX surface? (Assume I have a pointer to an appropriately sized DX X8R8G8B8 surface.)
Thanks.
John.
Given a pointer to an AVFrame from FFMPEG's avcodec_decode_video
() function how do I copy the image to a DirectX surface? (Assume I have a pointer to an appropriately sized DX X8R8G8B8 surface.)
Thanks.
John.
You can use FFMPEG's img_convert() function to simultaneously copy the image to your surface and convert it to RGB format. Here's a few lines of code pasted from a recent project of mine which did a similar thing (although I was using SDL instead of DirectX):