Commit 2a93f28a authored by Michael Niedermayer's avatar Michael Niedermayer

avformat_free_context: favor av_freep()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 3b6c0ba3
......@@ -2713,13 +2713,13 @@ void avformat_free_context(AVFormatContext *s)
av_free_packet(&st->cur_pkt);
}
av_dict_free(&st->metadata);
av_free(st->index_entries);
av_free(st->codec->extradata);
av_free(st->codec->subtitle_header);
av_free(st->codec);
av_free(st->priv_data);
av_free(st->info);
av_free(st);
av_freep(&st->index_entries);
av_freep(&st->codec->extradata);
av_freep(&st->codec->subtitle_header);
av_freep(&st->codec);
av_freep(&st->priv_data);
av_freep(&st->info);
av_freep(&st);
}
for(i=s->nb_programs-1; i>=0; i--) {
av_dict_free(&s->programs[i]->metadata);
......@@ -2730,7 +2730,7 @@ void avformat_free_context(AVFormatContext *s)
av_freep(&s->priv_data);
while(s->nb_chapters--) {
av_dict_free(&s->chapters[s->nb_chapters]->metadata);
av_free(s->chapters[s->nb_chapters]);
av_freep(&s->chapters[s->nb_chapters]);
}
av_freep(&s->chapters);
av_dict_free(&s->metadata);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment