avcodec/options: use av_opt_copy() in avcodec_copy_context() to copy priv_data
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 30 May 2014 19:04:52 +0000 (21:04 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 1 Jun 2014 18:50:08 +0000 (20:50 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/options.c

index 0026f88..64b27e5 100644 (file)
@@ -186,6 +186,10 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
     memcpy(dest, src, sizeof(*dest));
 
     dest->priv_data       = orig_priv_data;
+
+    if (orig_priv_data)
+        av_opt_copy(orig_priv_data, src->priv_data);
+
     dest->codec           = orig_codec;
 
     /* set values specific to opened codecs back to their default state */