Get the next frame in an animation decoder.
Defined in <SDL3_image/SDL_image.h>
bool IMG_GetNextAnimationDecoderFrame(IMG_AnimationDecoder *decoder, SDL_Surface** frame, Sint64* pts);
IMG_AnimationDecoder * | decoder | the animation decoder. |
Sint64 * | pts | a pointer to a Sint64 variable that will be set to the presentation timestamp of the frame, in milliseconds. |
(bool) Returns a new SDL_Surface containing the decoded frame, or NULL on error; call SDL_GetError() for more information.
This function decodes the next frame in the animation decoder, returning it as an SDL_Surface. The returned surface should be freed with SDL_FreeSurface() when no longer needed.
If the animation decoder has no more frames, this function returns NULL and only sets the error if the decoding has failed.
This function is available since SDL_image 3.4.0.