Mercurial > libavformat.hg
comparison matroskadec.c @ 3493:b77ced770a93 libavformat
matroskadec: fix a memory leak
author | aurel |
---|---|
date | Sun, 22 Jun 2008 15:46:36 +0000 |
parents | 8adaa9258dba |
children | 8bf1a8e12b43 |
comparison
equal
deleted
inserted
replaced
3492:6facc89bece8 | 3493:b77ced770a93 |
---|---|
2885 } | 2885 } |
2886 if (offset) | 2886 if (offset) |
2887 memcpy (pkt->data, matroska->tracks[track]->encoding_settings, offset); | 2887 memcpy (pkt->data, matroska->tracks[track]->encoding_settings, offset); |
2888 memcpy (pkt->data+offset, pkt_data, pkt_size); | 2888 memcpy (pkt->data+offset, pkt_data, pkt_size); |
2889 | 2889 |
2890 if (pkt_data != data) | |
2891 av_free(pkt_data); | |
2892 | |
2890 if (n == 0) | 2893 if (n == 0) |
2891 pkt->flags = is_keyframe; | 2894 pkt->flags = is_keyframe; |
2892 pkt->stream_index = stream_index; | 2895 pkt->stream_index = stream_index; |
2893 | 2896 |
2894 pkt->pts = timecode; | 2897 pkt->pts = timecode; |