[FFmpeg-cvslog] avformat/ty: fix memory leaks
Paul B Mahol
git at videolan.org
Sun Nov 12 21:39:49 EET 2017
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Nov 12 20:38:30 2017 +0100| [a38b14a432b3a031d6bafdbb5f790724b9b2094d] | committer: Paul B Mahol
avformat/ty: fix memory leaks
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a38b14a432b3a031d6bafdbb5f790724b9b2094d
---
libavformat/ty.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/libavformat/ty.c b/libavformat/ty.c
index 0f08e787f5..ba874280ea 100644
--- a/libavformat/ty.c
+++ b/libavformat/ty.c
@@ -764,6 +764,16 @@ static int ty_read_packet(AVFormatContext *s, AVPacket *pkt)
return 0;
}
+static int ty_read_close(AVFormatContext *s)
+{
+ TYDemuxContext *ty = s->priv_data;
+
+ av_freep(&ty->seq_table);
+ av_freep(&ty->rec_hdrs);
+
+ return 0;
+}
+
AVInputFormat ff_ty_demuxer = {
.name = "ty",
.long_name = NULL_IF_CONFIG_SMALL("TiVo TY Stream"),
@@ -771,6 +781,7 @@ AVInputFormat ff_ty_demuxer = {
.read_probe = ty_probe,
.read_header = ty_read_header,
.read_packet = ty_read_packet,
+ .read_close = ty_read_close,
.extensions = "ty,ty+",
.flags = AVFMT_TS_DISCONT,
};
More information about the ffmpeg-cvslog
mailing list