forked from FFmpeg/FFmpeg
fixed memory leak
Originally committed as revision 2525 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
91628427ec
commit
bcbecff13f
1 changed files with 2 additions and 4 deletions
|
@ -698,13 +698,11 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
/* free packet */
|
||||||
|
av_free_packet(&s->cur_pkt);
|
||||||
s->cur_st = NULL;
|
s->cur_st = NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* free previous packet */
|
|
||||||
if (s->cur_st && s->cur_st->parser)
|
|
||||||
av_free_packet(&s->cur_pkt);
|
|
||||||
|
|
||||||
/* read next packet */
|
/* read next packet */
|
||||||
ret = av_read_packet(s, &s->cur_pkt);
|
ret = av_read_packet(s, &s->cur_pkt);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue