diff options
author | Paul B Mahol <onemda@gmail.com> | 2017-11-12 20:38:30 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-11-12 20:38:30 +0100 |
commit | a38b14a432b3a031d6bafdbb5f790724b9b2094d (patch) | |
tree | d72f8a14b36ff8760b9180e43395e07392f9576a /libavformat/ty.c | |
parent | 6665938ca8b7ad8b7ec77c23e611bb8224e88a90 (diff) | |
download | ffmpeg-streaming-a38b14a432b3a031d6bafdbb5f790724b9b2094d.zip ffmpeg-streaming-a38b14a432b3a031d6bafdbb5f790724b9b2094d.tar.gz |
avformat/ty: fix memory leaks
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/ty.c')
-rw-r--r-- | libavformat/ty.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/ty.c b/libavformat/ty.c index 0f08e78..ba87428 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, }; |