summaryrefslogtreecommitdiff
path: root/libavcodec/options.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-04-05 07:40:49 +0200
committerAnton Khirnov <anton@khirnov.net>2014-05-15 07:51:39 +0200
commit3b2fbe67bd63b00331db2a9b213f6d420418a312 (patch)
treec681fa376e38dfb92dec6c92c5c443b04e066cfe /libavcodec/options.c
parentefc7df6c1f11b20a48e60c3f743ce2331b661973 (diff)
lavc: properly handle subtitle_header in avcodec_copy_context()
Diffstat (limited to 'libavcodec/options.c')
-rw-r--r--libavcodec/options.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/options.c b/libavcodec/options.c
index c28cbeb8e2..85c1bec9be 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -162,6 +162,7 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
dest->intra_matrix = NULL;
dest->inter_matrix = NULL;
dest->rc_override = NULL;
+ dest->subtitle_header = NULL;
if (src->rc_eq) {
dest->rc_eq = av_strdup(src->rc_eq);
if (!dest->rc_eq)
@@ -182,6 +183,8 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
alloc_and_copy_or_fail(intra_matrix, 64 * sizeof(int16_t), 0);
alloc_and_copy_or_fail(inter_matrix, 64 * sizeof(int16_t), 0);
alloc_and_copy_or_fail(rc_override, src->rc_override_count * sizeof(*src->rc_override), 0);
+ alloc_and_copy_or_fail(subtitle_header, src->subtitle_header_size, 0);
+ dest->subtitle_header_size = src->subtitle_header_size;
#undef alloc_and_copy_or_fail
return 0;