diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-30 21:04:52 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-01 20:50:08 +0200 |
commit | 8b686c886c808947b98ce0426fff213b14b836df (patch) | |
tree | aab4bf207225fa3ffc045f23af22ebf25eb5c164 /libavcodec/options.c | |
parent | 00759d71a288a25e28ac6393c891f4173084dd6c (diff) | |
download | ffmpeg-8b686c886c808947b98ce0426fff213b14b836df.tar.gz |
avcodec/options: use av_opt_copy() in avcodec_copy_context() to copy priv_data
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/options.c')
-rw-r--r-- | libavcodec/options.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 */ |