aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki2@gmail.com>2014-11-08 17:01:40 +0100
committerLukasz Marek <lukasz.m.luki2@gmail.com>2014-11-09 17:56:08 +0100
commitdb2caf0a80d25696a1b0a1308e79a2a128ec36f9 (patch)
treeb88d06c5f48b410f18e394a15561b520cc681895
parent86476c510ebd14d33ed02289d71bae874f8707a4 (diff)
downloadffmpeg-db2caf0a80d25696a1b0a1308e79a2a128ec36f9.tar.gz
lavc/options: fix shallow copy context
avcodec_copy_context leaves shallow copy of string/binary/dict options. Double free/accessing freed memory may occur. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
-rw-r--r--libavcodec/options.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/options.c b/libavcodec/options.c
index c4ee234766..461e4a13f0 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -187,6 +187,7 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
av_opt_free(dest);
memcpy(dest, src, sizeof(*dest));
+ av_opt_copy(dest, src);
dest->priv_data = orig_priv_data;