diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-10-10 16:01:21 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-10-15 10:37:44 +0200 |
commit | 79c47dfd25f101b6842bbec8c6ffef8d5077c3ae (patch) | |
tree | e30d5d0bfbe29b7463fb2d06869f7c808e535994 /libavcodec/utils.c | |
parent | c50f79a0dc4c4e29f3a8b759b031178d5ed57516 (diff) | |
download | ffmpeg-79c47dfd25f101b6842bbec8c6ffef8d5077c3ae.tar.gz |
lavc/hevcdec: unbreak WPP/progress2 code
The "progress2" API in pthread_slice.c currently associates a progress
value with a thread rather than a job, relying on the broken assumption
that a job's thread number is equal to its job number modulo thread
count.
This removes this API entirely, and changes hevcdec to use a
ThreadProgress-based implementation that associates a
mutex/cond/progress value with every job.
Fixes races and deadlocks in hevdec with slice threading, e.g. some of
those mentioned in #11221.
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index d68e672e0a..28023a4a4d 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -913,25 +913,6 @@ int ff_thread_can_start_frame(AVCodecContext *avctx) { return 1; } - -int ff_slice_thread_init_progress(AVCodecContext *avctx) -{ - return 0; -} - -int ff_slice_thread_allocz_entries(AVCodecContext *avctx, int count) -{ - return 0; -} - -void ff_thread_await_progress2(AVCodecContext *avctx, int field, int thread, int shift) -{ -} - -void ff_thread_report_progress2(AVCodecContext *avctx, int field, int thread, int n) -{ -} - #endif const uint8_t *avpriv_find_start_code(const uint8_t *restrict p, |