OSDN Git Service

libavformat: Use avcodec_copy_context for chained muxers
authorMartin Storsjö <martin@martin.st>
Fri, 4 Feb 2011 10:04:15 +0000 (12:04 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 6 Feb 2011 19:31:44 +0000 (20:31 +0100)
commit173f19be75a98fbfcf58a7e99871058232dc9dc2
treef3a094010fbd72055e2a47b409eb8e2f51864b53
parente9266a2be04ea505285e32e411ef6120e9cbeba4
libavformat: Use avcodec_copy_context for chained muxers

This avoids having the chained AVStream->codec point to the same
AVCodecContext owned by the outer AVStream. The downside is that
changes to the AVCodecContext made after calling av_write_header
cannot be detected automatically within the chained muxer.

This avoids having to manually unlink the chained AVStream->codec
by setting it to null before freeing the chained muxer via generic
freeing functions.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 1338dc082354b87c0e26f7f2ab09df5964b7f993)
libavformat/movenchint.c
libavformat/rtpenc_chain.c
libavformat/rtsp.c
libavformat/sapenc.c