fix memory leak on mpegts close

found by Andy Brown <abrown at daqtron com>

Originally committed as revision 5259 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Måns Rullgård 2006-04-01 18:19:00 +00:00
parent 54009d4295
commit 00a6b92bdd
1 changed files with 8 additions and 0 deletions

View File

@ -1374,6 +1374,14 @@ static int mpegts_read_close(AVFormatContext *s)
int i;
for(i=0;i<NB_PID_MAX;i++)
if (ts->pids[i]) mpegts_close_filter(ts, ts->pids[i]);
for(i = 0; i < ts->nb_services; i++){
av_free(ts->services[i]->provider_name);
av_free(ts->services[i]->name);
av_free(ts->services[i]);
}
av_freep(&ts->services);
return 0;
}