summaryrefslogtreecommitdiffstats
path: root/libavformat/matroskadec.c
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2008-06-22 15:46:36 +0000
committerAurelien Jacobs <aurel@gnuage.org>2008-06-22 15:46:36 +0000
commit51e1cc16d3e89a785f3231065c4eb898a0401a93 (patch)
tree65f717f001fc9744dc0527f5b588a5287ecff0fd /libavformat/matroskadec.c
parentf5048aaf6982932db7d8209bed85158f959dcb1a (diff)
downloadffmpeg-streaming-51e1cc16d3e89a785f3231065c4eb898a0401a93.zip
ffmpeg-streaming-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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 69208a8..e01af26 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;
OpenPOWER on IntegriCloud