diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2008-06-22 15:46:36 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2008-06-22 15:46:36 +0000 |
commit | 51e1cc16d3e89a785f3231065c4eb898a0401a93 (patch) | |
tree | 65f717f001fc9744dc0527f5b588a5287ecff0fd /libavformat/matroskadec.c | |
parent | f5048aaf6982932db7d8209bed85158f959dcb1a (diff) | |
download | ffmpeg-51e1cc16d3e89a785f3231065c4eb898a0401a93.tar.gz |
matroskadec: fix a memory leak
Originally committed as revision 13890 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 69208a8f0b..e01af26290 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2887,6 +2887,9 @@ matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, int size, memcpy (pkt->data, matroska->tracks[track]->encoding_settings, offset); memcpy (pkt->data+offset, pkt_data, pkt_size); + if (pkt_data != data) + av_free(pkt_data); + if (n == 0) pkt->flags = is_keyframe; pkt->stream_index = stream_index; |