Skip to content

Commit

Permalink
Fix a memory leak in mpegts.c
Browse files Browse the repository at this point in the history
(cherry picked from commit d6d489f)
  • Loading branch information
Mark Kendall committed Jan 23, 2011
1 parent bebb13b commit 61c78f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mythtv/external/FFmpeg/libavformat/mpegts.c
Expand Up @@ -638,6 +638,7 @@ static void mpegts_push_section(MpegTSFilter *filter, const uint8_t *section, in
if (sect->new_packet && pkt && sect->st) {
int pktLen = section_len + 184; /* Add enough for a complete TS payload. */
sect->new_packet = 0;
av_free_packet(pkt);
if (av_new_packet(pkt, pktLen) == 0) {
memcpy(pkt->data, section, section_len);
memset(pkt->data+section_len, 0xff, pktLen-section_len);
Expand Down

0 comments on commit 61c78f5

Please sign in to comment.