[FFmpeg-cvslog] avformat/utils: Close codec context since it is allocated by avformat_new_stream in refrence to ticket 2716
Anshul Maheshwari
git at videolan.org
Sun Jul 21 15:54:08 CEST 2013
ffmpeg | branch: master | Anshul Maheshwari <er.anshul.maheshwari at gmail.com> | Thu Jun 27 15:57:19 2013 +0530| [0f229f9b91fe3c4ebd97e88f004d638819b76add] | committer: Michael Niedermayer
avformat/utils: Close codec context since it is allocated by avformat_new_stream in refrence to ticket 2716
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0f229f9b91fe3c4ebd97e88f004d638819b76add
---
libavformat/utils.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 9fd5e6e..202933e 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3178,6 +3178,9 @@ void ff_free_stream(AVFormatContext *s, AVStream *st){
av_assert0(s->nb_streams>0);
av_assert0(s->streams[ s->nb_streams-1 ] == st);
+ if (st->codec) {
+ avcodec_close(st->codec);
+ }
if (st->parser) {
av_parser_close(st->parser);
}
More information about the ffmpeg-cvslog
mailing list