uniformize AVStream->priv_data freeing in av_close_input_stream

Originally committed as revision 13838 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Baptiste Coudurier 17 years ago
parent ccafd47251
commit ade8d8b939
  1. 1
      libavformat/asf.c
  2. 2
      libavformat/avidec.c
  3. 1
      libavformat/mov.c
  4. 2
      libavformat/mpegts.c
  5. 1
      libavformat/utils.c

@ -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;

@ -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);
}

@ -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++){

@ -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;

@ -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--) {

Loading…
Cancel
Save