diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-02-07 13:46:11 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-02-16 22:11:53 +0100 |
commit | 76d428e090e0a547b2e6be6dbd22cf87817adec7 (patch) | |
tree | 98afc4450cea4a2aab2a03b9f7adbb847ffbef6c /libavcodec/encode.c | |
parent | fbf242a51d4005a11d1a52dc5d2bff939311c24d (diff) |
avcodec/frame_thread_encoder: Avoid creating reference to frame
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/encode.c')
-rw-r--r-- | libavcodec/encode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/encode.c b/libavcodec/encode.c index 29f41c3f92..282337e453 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -152,6 +152,10 @@ static int encode_simple_internal(AVCodecContext *avctx, AVPacket *avpkt) if (CONFIG_FRAME_THREAD_ENCODER && avci->frame_thread_encoder && (avctx->active_thread_type & FF_THREAD_FRAME)) + /* This might modify frame, but it doesn't matter, because + * the frame properties used below are not used for video + * (due to the delay inherent in frame threaded encoding, it makes + * no sense to use the properties of the current frame anyway). */ ret = ff_thread_video_encode_frame(avctx, avpkt, frame, &got_packet); else { ret = avctx->codec->encode2(avctx, avpkt, frame, &got_packet); |