diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-10-22 04:56:34 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-10-22 04:56:34 +0200 |
commit | 51154b71be6be742541f53a21b5c9d39d0033270 (patch) | |
tree | 348cc95ce90744c14884b2821136586b5ea8ed09 /src/capture/capture.c | |
parent | 44d50065b92284638398b4989490ac66eb34c53e (diff) |
Fix vram leak for reals
Diffstat (limited to 'src/capture/capture.c')
-rw-r--r-- | src/capture/capture.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/capture/capture.c b/src/capture/capture.c index 699745a..eea0d1d 100644 --- a/src/capture/capture.c +++ b/src/capture/capture.c @@ -42,6 +42,18 @@ int gsr_capture_capture(gsr_capture *cap, AVFrame *frame) { return cap->capture(cap, frame); } +void gsr_capture_end(gsr_capture *cap, AVFrame *frame) { + if(!cap->started) { + fprintf(stderr, "gsr error: gsr_capture_end failed: the gsr capture has not been started\n"); + return; + } + + if(!cap->capture_end) + return; + + cap->capture_end(cap, frame); +} + void gsr_capture_destroy(gsr_capture *cap, AVCodecContext *video_codec_context) { cap->destroy(cap, video_codec_context); } |