Browse Source

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.3
Michael Niedermayer 11 years ago
parent
commit
8b686c886c
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavcodec/options.c

+ 4
- 0
libavcodec/options.c 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 */


Loading…
Cancel
Save