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/internal.h | |
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/internal.h')
-rw-r--r-- | libavcodec/internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h index fb2c0dbe56..dfef6eb31f 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -157,4 +157,6 @@ static av_always_inline int64_t ff_samples_to_time_base(AVCodecContext *avctx, avctx->time_base); } +int ff_thread_can_start_frame(AVCodecContext *avctx); + #endif /* AVCODEC_INTERNAL_H */ |