We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5067c3 commit 8c19440Copy full SHA for 8c19440
src/video_capture/file.c
@@ -168,6 +168,7 @@ static void vidcap_file_show_help(bool full) {
168
}
169
170
static void flush_captured_data(struct vidcap_state_lavf_decoder *s) {
171
+ pthread_mutex_lock(&s->lock);
172
struct video_frame *f = NULL;
173
while ((f = simple_linked_list_pop(s->video_frame_queue)) != NULL) {
174
VIDEO_FRAME_DISPOSE(f);
@@ -185,6 +186,7 @@ static void flush_captured_data(struct vidcap_state_lavf_decoder *s) {
185
186
avcodec_flush_buffers(s->aud_ctx);
187
188
s->audio_end_ts = AV_NOPTS_VALUE;
189
+ pthread_mutex_unlock(&s->lock);
190
191
192
static void vidcap_file_common_cleanup(struct vidcap_state_lavf_decoder *s) {
0 commit comments