fix memleak, free stream codec allocated by av_new_stream
Originally committed as revision 7225 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
2421a01b25
commit
3c13202396
4
ffmpeg.c
4
ffmpeg.c
@ -3942,8 +3942,10 @@ int main(int argc, char **argv)
|
|||||||
int j;
|
int j;
|
||||||
if (!(s->oformat->flags & AVFMT_NOFILE))
|
if (!(s->oformat->flags & AVFMT_NOFILE))
|
||||||
url_fclose(&s->pb);
|
url_fclose(&s->pb);
|
||||||
for(j=0;j<s->nb_streams;j++)
|
for(j=0;j<s->nb_streams;j++) {
|
||||||
|
av_free(s->streams[j]->codec);
|
||||||
av_free(s->streams[j]);
|
av_free(s->streams[j]);
|
||||||
|
}
|
||||||
av_free(s);
|
av_free(s);
|
||||||
}
|
}
|
||||||
for(i=0;i<nb_input_files;i++)
|
for(i=0;i<nb_input_files;i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user