[FFmpeg-devel] [PATCH 2/6] libavformat: Use avcodec_copy_context for chained muxers

Ronald S. Bultje rsbultje
Thu Feb 3 15:44:43 CET 2011


Hi,

On Thu, Feb 3, 2011 at 7:10 AM, Martin Storsj? <martin at martin.st> wrote:
> 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.
> ---
> ?libavformat/movenchint.c ? | ? ?9 +++++----
> ?libavformat/rtpenc_chain.c | ? ?8 +++-----
> ?libavformat/rtsp.c ? ? ? ? | ? ?2 ++
> ?libavformat/sapenc.c ? ? ? | ? ?2 ++
> ?4 files changed, 12 insertions(+), 9 deletions(-)

This looks OK. You've checked this using valgrind to ensure we're not
introducing new memleaks here, right?

Ronald



More information about the ffmpeg-devel mailing list