summaryrefslogtreecommitdiff
path: root/libavcodec/frame_thread_encoder.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-05-11 22:33:19 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-06-08 12:52:50 +0200
commitcbf6047c83c8142dd13fabd07906a844f4165f19 (patch)
treec522bb6b2e7ff6a1aa78716d30eb121d05f1950e /libavcodec/frame_thread_encoder.c
parent3f6e7153361b09e12cd6e97ce5a9175048653296 (diff)
downloadffmpeg-cbf6047c83c8142dd13fabd07906a844f4165f19.tar.gz
avcodec/frame_thread_encoder: Remove redundant memcpy
In case the underlying AVCodec has no private class, the private data of both the main as well as each worker AVCodecContext is just zeroed (the codec's init function has not been called on any of them and without a private class there is no way to legitimately set anything before the aforementioned init function). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/frame_thread_encoder.c')
-rw-r--r--libavcodec/frame_thread_encoder.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/libavcodec/frame_thread_encoder.c b/libavcodec/frame_thread_encoder.c
index 5d14442c01..b3e571f4b0 100644
--- a/libavcodec/frame_thread_encoder.c
+++ b/libavcodec/frame_thread_encoder.c
@@ -215,8 +215,6 @@ int ff_frame_thread_encoder_init(AVCodecContext *avctx)
int ret = av_opt_copy(thread_avctx->priv_data, avctx->priv_data);
if (ret < 0)
goto fail;
- } else if (avctx->codec->priv_data_size) {
- memcpy(thread_avctx->priv_data, avctx->priv_data, avctx->codec->priv_data_size);
}
thread_avctx->thread_count = 1;
thread_avctx->active_thread_type &= ~FF_THREAD_FRAME;