]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/frame_thread_encoder: Fix AV_OPT_TYPE_STRING handling in avctx
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Wed, 13 Sep 2017 16:59:21 +0000 (18:59 +0200)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 16 Sep 2017 14:46:00 +0000 (16:46 +0200)
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@gmx.de>
libavcodec/frame_thread_encoder.c

index 35a37c4372d27971a2728dc16731bdd74a6c1c46..31a9fe9dae7e4f193ce42d5065d9937c41bb16f8 100644 (file)
@@ -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) {