diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-07-03 09:51:44 +0000 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-12-20 17:44:20 +0100 |
commit | e518cb863edc931888ccca6cad86f73ca7430cef (patch) | |
tree | d2d9d7ff0485856b4d704c0b715acc877c088786 /libavformat/jvdec.c | |
parent | 027712e851da4d124a842c9e2802f95d50582553 (diff) | |
download | ffmpeg-e518cb863edc931888ccca6cad86f73ca7430cef.tar.gz |
jvdec: Fix memory leak of jv->frames
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavformat/jvdec.c')
-rw-r--r-- | libavformat/jvdec.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavformat/jvdec.c b/libavformat/jvdec.c index caf29a8f6c..6bf220fed2 100644 --- a/libavformat/jvdec.c +++ b/libavformat/jvdec.c @@ -59,6 +59,15 @@ static int read_probe(AVProbeData *pd) return 0; } +static int read_close(AVFormatContext *s) +{ + JVDemuxContext *jv = s->priv_data; + + av_freep(&jv->frames); + + return 0; +} + static int read_header(AVFormatContext *s) { JVDemuxContext *jv = s->priv_data; @@ -229,4 +238,5 @@ AVInputFormat ff_jv_demuxer = { .read_header = read_header, .read_packet = read_packet, .read_seek = read_seek, + .read_close = read_close, }; |