Remove frame buffer internal mutex

Let the caller handle locking as needed, allowing them to perform other
actions under the same lock.
This commit is contained in:
Romain Vimont 2026-04-07 20:35:01 +02:00
parent ce0d0cc61f
commit b049f51f49
5 changed files with 36 additions and 35 deletions

View file

@ -24,8 +24,6 @@ struct sc_frame_buffer {
AVFrame *pending_frame;
AVFrame *tmp_frame; // To preserve the pending frame on error
sc_mutex mutex;
bool pending_frame_consumed;
};
@ -36,8 +34,10 @@ void
sc_frame_buffer_destroy(struct sc_frame_buffer *fb);
bool
sc_frame_buffer_push(struct sc_frame_buffer *fb, const AVFrame *frame,
bool *skipped);
sc_frame_buffer_has_frame(struct sc_frame_buffer *fb);
bool
sc_frame_buffer_push(struct sc_frame_buffer *fb, const AVFrame *frame);
void
sc_frame_buffer_consume(struct sc_frame_buffer *fb, AVFrame *dst);