Revision 094d9df7 libavformat/utils.c

View differences:

libavformat/utils.c
2285 2285
        if (st->parser) {
2286 2286
            av_parser_close(st->parser);
2287 2287
        }
2288
        av_metadata_free(&st->metadata);
2288 2289
        av_free(st->index_entries);
2289 2290
        av_free(st->codec->extradata);
2290 2291
        av_free(st->codec);
......
2295 2296
    for(i=s->nb_programs-1; i>=0; i--) {
2296 2297
        av_freep(&s->programs[i]->provider_name);
2297 2298
        av_freep(&s->programs[i]->name);
2299
        av_metadata_free(&s->programs[i]->metadata);
2298 2300
        av_freep(&s->programs[i]->stream_index);
2299 2301
        av_freep(&s->programs[i]);
2300 2302
    }
......
2303 2305
    av_freep(&s->priv_data);
2304 2306
    while(s->nb_chapters--) {
2305 2307
        av_free(s->chapters[s->nb_chapters]->title);
2308
        av_metadata_free(&s->chapters[s->nb_chapters]->metadata);
2306 2309
        av_free(s->chapters[s->nb_chapters]);
2307 2310
    }
2308 2311
    av_freep(&s->chapters);
2309
    if(s->metadata){
2310
        while(s->metadata->count--){
2311
            av_freep(&s->metadata->elems[s->metadata->count].key);
2312
            av_freep(&s->metadata->elems[s->metadata->count].value);
2313
        }
2314
        av_freep(&s->metadata->elems);
2315
    }
2316
    av_freep(&s->metadata);
2312
    av_metadata_free(&s->metadata);
2317 2313
    av_free(s);
2318 2314
}
2319 2315

  

Also available in: Unified diff