diff options
| author | dec05eba <dec05eba@protonmail.com> | 2026-08-06 13:02:59 +0200 |
|---|---|---|
| committer | dec05eba <dec05eba@protonmail.com> | 2026-08-06 13:02:59 +0200 |
| commit | e31968fc4074df739c00947b993ee19be4ef1caa (patch) | |
| tree | 57f2d57cd9392bf28fe57e82bc25017a4c4d9d59 /include/encoder/encoder.h | |
| parent | 5db30f3fb99545524fc80f87ecc488972aec1711 (diff) | |
Faster shutdown time when several gb of replay data is in ram
Diffstat (limited to 'include/encoder/encoder.h')
| -rw-r--r-- | include/encoder/encoder.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/encoder/encoder.h b/include/encoder/encoder.h index b46deb5..15009f1 100644 --- a/include/encoder/encoder.h +++ b/include/encoder/encoder.h @@ -41,7 +41,11 @@ typedef struct { } gsr_encoder; bool gsr_encoder_init(gsr_encoder *self, gsr_replay_storage replay_storage, size_t replay_buffer_num_packets, double replay_buffer_time, const char *replay_directory); -void gsr_encoder_deinit(gsr_encoder *self); +/* + When |exiting| is set the memory of the replay buffer is left to the operating system to free, which makes + this much faster when the replay buffer holds several gigabytes of data. See gsr_replay_buffer_destroy_at_exit. +*/ +void gsr_encoder_deinit(gsr_encoder *self, bool exiting); void gsr_encoder_receive_packets(gsr_encoder *self, AVCodecContext *codec_context, int64_t pts, int stream_index); /* Returns the id to the recording destination, or -1 on error */ |
