1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-18 02:11:37 +02:00

avcodec/options: use av_opt_copy() in avcodec_copy_context() to copy priv_data

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-05-30 21:04:52 +02:00
parent 00759d71a2
commit 8b686c886c

View 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 */