Commit db2caf0a authored by Lukasz Marek's avatar Lukasz Marek

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: 's avatarLukasz Marek <lukasz.m.luki2@gmail.com>
parent 86476c51
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment