diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2003-11-20 11:22:25 +0000 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2003-11-20 11:22:25 +0000 |
commit | bcbecff13f2d9c8af19039fa82703efd4c04eb97 (patch) | |
tree | 0b53652398bbecb39f235321d6da942d10a4ed07 | |
parent | 91628427ecea133dfc6f72bc060d210f2af835cb (diff) | |
download | ffmpeg-bcbecff13f2d9c8af19039fa82703efd4c04eb97.tar.gz |
fixed memory leak
Originally committed as revision 2525 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/utils.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 036c384bea..7cbb1a0246 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -698,13 +698,11 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt) return 0; } } else { + /* free packet */ + av_free_packet(&s->cur_pkt); s->cur_st = NULL; } } else { - /* free previous packet */ - if (s->cur_st && s->cur_st->parser) - av_free_packet(&s->cur_pkt); - /* read next packet */ ret = av_read_packet(s, &s->cur_pkt); if (ret < 0) |