[FFmpeg-devel] [PATCH] avcodec/frame_thread_encoder: Fix AV_OPT_TYPE_STRING handling in avctx

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Sep 13 20:12:48 EEST 2017


This is the equivalent to what 7d317d4706b49d572a1eb5269438753be18362c7
did for the codec-specific options.
av_opt_copy has specific handling so it's fine that we already copied
the whole context before.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
 libavcodec/frame_thread_encoder.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/frame_thread_encoder.c b/libavcodec/frame_thread_encoder.c
index 35a37c4..31a9fe9 100644
--- a/libavcodec/frame_thread_encoder.c
+++ b/libavcodec/frame_thread_encoder.c
@@ -199,6 +199,9 @@ int ff_frame_thread_encoder_init(AVCodecContext *avctx, AVDictionary *options){
             goto fail;
         tmpv = thread_avctx->priv_data;
         *thread_avctx = *avctx;
+        int ret = av_opt_copy(thread_avctx, avctx);
+        if (ret < 0)
+            goto fail;
         thread_avctx->priv_data = tmpv;
         thread_avctx->internal = NULL;
         if (avctx->codec->priv_class) {
-- 
2.11.0



More information about the ffmpeg-devel mailing list