forked from FFmpeg/FFmpeg
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:
parent
ccafd47251
commit
ade8d8b939
5 changed files with 1 additions and 6 deletions
|
@ -925,7 +925,6 @@ static int asf_read_close(AVFormatContext *s)
|
||||||
asf_reset_header(s);
|
asf_reset_header(s);
|
||||||
for(i=0;i<s->nb_streams;i++) {
|
for(i=0;i<s->nb_streams;i++) {
|
||||||
AVStream *st = s->streams[i];
|
AVStream *st = s->streams[i];
|
||||||
av_free(st->priv_data);
|
|
||||||
av_free(st->codec->palctrl);
|
av_free(st->codec->palctrl);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1060,8 +1060,6 @@ static int avi_read_close(AVFormatContext *s)
|
||||||
|
|
||||||
for(i=0;i<s->nb_streams;i++) {
|
for(i=0;i<s->nb_streams;i++) {
|
||||||
AVStream *st = s->streams[i];
|
AVStream *st = s->streams[i];
|
||||||
AVIStream *ast = st->priv_data;
|
|
||||||
av_free(ast);
|
|
||||||
av_free(st->codec->palctrl);
|
av_free(st->codec->palctrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1899,7 +1899,6 @@ static int mov_read_close(AVFormatContext *s)
|
||||||
av_freep(&sc->drefs);
|
av_freep(&sc->drefs);
|
||||||
if (sc->pb && sc->pb != s->pb)
|
if (sc->pb && sc->pb != s->pb)
|
||||||
url_fclose(sc->pb);
|
url_fclose(sc->pb);
|
||||||
av_freep(&sc);
|
|
||||||
}
|
}
|
||||||
if(mov->dv_demux){
|
if(mov->dv_demux){
|
||||||
for(i=0; i<mov->dv_fctx->nb_streams; i++){
|
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;
|
pid = filter->pid;
|
||||||
if (filter->type == MPEGTS_SECTION)
|
if (filter->type == MPEGTS_SECTION)
|
||||||
av_freep(&filter->u.section_filter.section_buf);
|
av_freep(&filter->u.section_filter.section_buf);
|
||||||
else if (filter->type == MPEGTS_PES)
|
|
||||||
av_freep(&filter->u.pes_filter.opaque);
|
|
||||||
|
|
||||||
av_free(filter);
|
av_free(filter);
|
||||||
ts->pids[pid] = NULL;
|
ts->pids[pid] = NULL;
|
||||||
|
|
|
@ -2203,6 +2203,7 @@ void av_close_input_stream(AVFormatContext *s)
|
||||||
av_free(st->codec->extradata);
|
av_free(st->codec->extradata);
|
||||||
av_free(st->codec);
|
av_free(st->codec);
|
||||||
av_free(st->filename);
|
av_free(st->filename);
|
||||||
|
av_free(st->priv_data);
|
||||||
av_free(st);
|
av_free(st);
|
||||||
}
|
}
|
||||||
for(i=s->nb_programs-1; i>=0; i--) {
|
for(i=s->nb_programs-1; i>=0; i--) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue