uniformize AVStream->priv_data freeing in av_close_input_stream

Originally committed as revision 13838 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2008-06-20 17:22:56 +00:00
parent ccafd47251
commit ade8d8b939
5 changed files with 1 additions and 6 deletions

View File

@ -925,7 +925,6 @@ static int asf_read_close(AVFormatContext *s)
asf_reset_header(s);
for(i=0;i<s->nb_streams;i++) {
AVStream *st = s->streams[i];
av_free(st->priv_data);
av_free(st->codec->palctrl);
}
return 0;

View File

@ -1060,8 +1060,6 @@ static int avi_read_close(AVFormatContext *s)
for(i=0;i<s->nb_streams;i++) {
AVStream *st = s->streams[i];
AVIStream *ast = st->priv_data;
av_free(ast);
av_free(st->codec->palctrl);
}

View File

@ -1899,7 +1899,6 @@ static int mov_read_close(AVFormatContext *s)
av_freep(&sc->drefs);
if (sc->pb && sc->pb != s->pb)
url_fclose(sc->pb);
av_freep(&sc);
}
if(mov->dv_demux){
for(i=0; i<mov->dv_fctx->nb_streams; i++){

View File

@ -334,8 +334,6 @@ static void mpegts_close_filter(MpegTSContext *ts, MpegTSFilter *filter)
pid = filter->pid;
if (filter->type == MPEGTS_SECTION)
av_freep(&filter->u.section_filter.section_buf);
else if (filter->type == MPEGTS_PES)
av_freep(&filter->u.pes_filter.opaque);
av_free(filter);
ts->pids[pid] = NULL;

View File

@ -2203,6 +2203,7 @@ void av_close_input_stream(AVFormatContext *s)
av_free(st->codec->extradata);
av_free(st->codec);
av_free(st->filename);
av_free(st->priv_data);
av_free(st);
}
for(i=s->nb_programs-1; i>=0; i--) {