From 8b686c886c808947b98ce0426fff213b14b836df Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 30 May 2014 21:04:52 +0200 Subject: avcodec/options: use av_opt_copy() in avcodec_copy_context() to copy priv_data Signed-off-by: Michael Niedermayer --- libavcodec/options.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/options.c b/libavcodec/options.c index 0026f88b89..64b27e5768 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -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 */ -- cgit v1.2.3