[FFmpeg-devel] [PATCH 4/4] avcodec/options: use av_opt_copy() in avcodec_copy_context() to copy priv_data
Michael Niedermayer
michaelni at gmx.at
Fri May 30 21:24:25 CEST 2014
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
libavcodec/options.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/options.c b/libavcodec/options.c
index 0026f88..64b27e5 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 */
--
1.7.9.5
More information about the ffmpeg-devel
mailing list