Commit bcbecff1 authored by Fabrice Bellard's avatar Fabrice Bellard

fixed memory leak

Originally committed as revision 2525 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 91628427
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment