diff options
author | Martin Storsjö <martin@martin.st> | 2011-02-04 12:04:15 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-06 20:31:44 +0100 |
commit | 173f19be75a98fbfcf58a7e99871058232dc9dc2 (patch) | |
tree | f3a094010fbd72055e2a47b409eb8e2f51864b53 /libavformat/rtsp.c | |
parent | e9266a2be04ea505285e32e411ef6120e9cbeba4 (diff) | |
download | ffmpeg-173f19be75a98fbfcf58a7e99871058232dc9dc2.tar.gz |
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)
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 52c686c3e5..d31e8eeae4 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -500,6 +500,8 @@ void ff_rtsp_undo_setup(AVFormatContext *s) } av_metadata_free(&rtpctx->streams[0]->metadata); av_metadata_free(&rtpctx->metadata); + av_free(rtpctx->streams[0]->codec->extradata); + av_free(rtpctx->streams[0]->codec); av_free(rtpctx->streams[0]->info); av_free(rtpctx->streams[0]); av_free(rtpctx); |