mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 23:40:26 +00:00
vcap/file: missing lock
When playing single JPEG, the s->video_frame_queue got corrupted (.size() returned UINT_MAX).
This commit is contained in:
@@ -168,6 +168,7 @@ static void vidcap_file_show_help(bool full) {
|
||||
}
|
||||
|
||||
static void flush_captured_data(struct vidcap_state_lavf_decoder *s) {
|
||||
pthread_mutex_lock(&s->lock);
|
||||
struct video_frame *f = NULL;
|
||||
while ((f = simple_linked_list_pop(s->video_frame_queue)) != NULL) {
|
||||
VIDEO_FRAME_DISPOSE(f);
|
||||
@@ -185,6 +186,7 @@ static void flush_captured_data(struct vidcap_state_lavf_decoder *s) {
|
||||
avcodec_flush_buffers(s->aud_ctx);
|
||||
}
|
||||
s->audio_end_ts = AV_NOPTS_VALUE;
|
||||
pthread_mutex_unlock(&s->lock);
|
||||
}
|
||||
|
||||
static void vidcap_file_common_cleanup(struct vidcap_state_lavf_decoder *s) {
|
||||
|
||||
Reference in New Issue
Block a user