aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-12-14 20:15:02 +0100
committerAnton Khirnov <anton@khirnov.net>2023-12-18 08:50:02 +0100
commit2ad0b8e0ea36115595f16bca203a5fdaabafb4ab (patch)
tree75ad2d82a24166d723b2056b84a12fbc5eb329db /fftools/ffmpeg.h
parent244d2fcc49452f3c5aa0f4899c7c0c03ccc6a69e (diff)
downloadffmpeg-2ad0b8e0ea36115595f16bca203a5fdaabafb4ab.tar.gz
fftools/ffmpeg: use a mutex for enc_stats_write()
It may be called concurrently from different threads to write into the same file.
Diffstat (limited to 'fftools/ffmpeg.h')
-rw-r--r--fftools/ffmpeg.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index 03dbb528c0..33a29b316f 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -480,6 +480,9 @@ typedef struct EncStats {
int nb_components;
AVIOContext *io;
+
+ pthread_mutex_t lock;
+ int lock_initialized;
} EncStats;
extern const char *const forced_keyframes_const_names[];