diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-09-07 09:26:39 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-09-07 09:26:39 +0000 |
commit | 0a5f92a120118286961a28486cb2a1d96ca47627 (patch) | |
tree | b3b459e4b8ea39c1c558c4645d9bb2bf75cde32c | |
parent | ed0bb7bee6bcc8cb92f09b8508ae515be654a981 (diff) | |
download | ffmpeg-0a5f92a120118286961a28486cb2a1d96ca47627.tar.gz |
memory leak fix by (Tom Dexter <devel at www dot digitalaudiorock dot com>)
Originally committed as revision 2216 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/utils.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index f42dd3f6b3..e169b076d9 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -555,6 +555,7 @@ static void flush_packet_queue(AVFormatContext *s) if (!pktl) break; s->packet_buffer = pktl->next; + av_free_packet(&pktl->pkt); av_free(pktl); } } @@ -594,9 +595,9 @@ static void av_estimate_timings_from_pts(AVFormatContext *ic) if (pkt->pts != AV_NOPTS_VALUE) { if (st->start_time == AV_NOPTS_VALUE) st->start_time = (int64_t)((double)pkt->pts * ic->pts_num * (double)AV_TIME_BASE / ic->pts_den); - } - av_free_packet(pkt); - } + } + av_free_packet(pkt); + } /* we compute the minimum start_time and use it as default */ start_time = MAXINT64; |