Skip to content
Browse files

Fix a memory leak in mpegts.c

(cherry picked from commit d6d489f)
  • Loading branch information...
1 parent bebb13b commit 61c78f53245cbbaf6d15c9541a25fdc3209d0177 Mark Kendall committed Jan 23, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 mythtv/external/FFmpeg/libavformat/mpegts.c
View
1 mythtv/external/FFmpeg/libavformat/mpegts.c
@@ -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);

0 comments on commit 61c78f5

Please sign in to comment.
Something went wrong with that request. Please try again.