diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-24 00:20:05 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-24 00:32:18 +0100 |
commit | 59a4b73531428d2f420b4dad545172c8483ced0f (patch) | |
tree | babb12b764acdbba333a9b29a31a6e9c406e7342 /libavcodec/utils.c | |
parent | 71c2a70cbfbb5fea6dffa5e462b0227565e29bcc (diff) | |
download | ffmpeg-59a4b73531428d2f420b4dad545172c8483ced0f.tar.gz |
pthread/mpegvideo: detect and block attempts to init frames after setup.
This fixes race conditions that ultimately lead to memory corruption.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index e918024ca5..58435d43aa 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -2285,6 +2285,11 @@ void ff_thread_await_progress(AVFrame *f, int progress, int field) { } +int ff_thread_can_start_frame(AVCodecContext *avctx) +{ + return 1; +} + #endif enum AVMediaType avcodec_get_type(enum CodecID codec_id) |