mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +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:
parent
00759d71a2
commit
8b686c886c
@ -186,6 +186,10 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
|
|||||||
memcpy(dest, src, sizeof(*dest));
|
memcpy(dest, src, sizeof(*dest));
|
||||||
|
|
||||||
dest->priv_data = orig_priv_data;
|
dest->priv_data = orig_priv_data;
|
||||||
|
|
||||||
|
if (orig_priv_data)
|
||||||
|
av_opt_copy(orig_priv_data, src->priv_data);
|
||||||
|
|
||||||
dest->codec = orig_codec;
|
dest->codec = orig_codec;
|
||||||
|
|
||||||
/* set values specific to opened codecs back to their default state */
|
/* set values specific to opened codecs back to their default state */
|
||||||
|
Loading…
Reference in New Issue
Block a user