---
name: "SDL_ReleaseCameraFrame"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_ReleaseCameraFrame"
---

# SDL\_ReleaseCameraFrame(3)

Release a frame of video acquired from a camera.

## NAME

SDL\_ReleaseCameraFrame - Release a frame of video acquired from a camera.

## HEADER FILE

Defined in SDL3/SDL\_camera.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**void SDL\_ReleaseCameraFrame(SDL\_Camera \*camera, SDL\_Surface \*frame);**

## DESCRIPTION

Let the back-end re-use the internal buffer for camera.

This function \_must\_ be called only on surface objects returned by

**SDL\_AcquireCameraFrame** (). This function should be called as quickly as possible after acquisition, as SDL keeps a small FIFO queue of surfaces for video frames; if surfaces aren't released in a timely manner, SDL may drop upcoming video frames from the camera.

If the app needs to keep the surface for a significant time, they should make a copy of it and release the original.

The app should not use the surface again after calling this function; assume the surface is freed and the pointer is invalid.

## FUNCTION PARAMETERS

- *camera*

  opened camera device.

- *frame*

  the video frame surface to release.

## THREAD SAFETY

It is safe to call this function from any thread.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_AcquireCameraFrame**(3)](/SDL_AcquireCameraFrame/3.md)
