aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/frame_thread_encoder.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-08-14 09:55:00 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-09 22:02:21 +0200
commit492318cb65967ff220ad84d2034f78c24fbdda54 (patch)
tree573fa8c51356417245be56ee91e624a8946f9865 /libavcodec/frame_thread_encoder.h
parent161750d194fb4997e067f90412c4430d77f98515 (diff)
downloadffmpeg-492318cb65967ff220ad84d2034f78c24fbdda54.tar.gz
avcodec/frame_thread_encoder: Free AVCodecContext structure on error during init
Fixes: MemLeak Fixes: 8281 Fixes: PoC_option158.jpg Fixes: CVE-2020-22037 Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 7bba0dd6382e30d646cb406034a66199e071d713) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/frame_thread_encoder.h')
-rw-r--r--libavcodec/frame_thread_encoder.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/frame_thread_encoder.h b/libavcodec/frame_thread_encoder.h
index 1f79553f20..fc85ba48b8 100644
--- a/libavcodec/frame_thread_encoder.h
+++ b/libavcodec/frame_thread_encoder.h
@@ -23,6 +23,10 @@
#include "avcodec.h"
+/**
+ * Initialize frame thread encoder.
+ * @note hardware encoders are not supported
+ */
int ff_frame_thread_encoder_init(AVCodecContext *avctx, AVDictionary *options);
void ff_frame_thread_encoder_free(AVCodecContext *avctx);
int ff_thread_video_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet_ptr);