Revision 42f97696 ffmpeg.c

View differences:

ffmpeg.c
515 515

  
516 516
    /* close files */
517 517
    for(i=0;i<nb_output_files;i++) {
518
        /* maybe av_close_output_file ??? */
519 518
        AVFormatContext *s = output_files[i];
520 519
        int j;
521 520
        if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb)
522 521
            url_fclose(s->pb);
523
        for(j=0;j<s->nb_streams;j++) {
524
            av_metadata_free(&s->streams[j]->metadata);
525
            av_free(s->streams[j]->codec);
526
            av_free(s->streams[j]->info);
527
            av_free(s->streams[j]);
528
        }
529
        for(j=0;j<s->nb_programs;j++) {
530
            av_metadata_free(&s->programs[j]->metadata);
531
        }
532
        for(j=0;j<s->nb_chapters;j++) {
533
            av_metadata_free(&s->chapters[j]->metadata);
534
        }
535
        av_metadata_free(&s->metadata);
536
        av_free(s);
522
        avformat_free_context(s);
537 523
        av_free(output_streams_for_file[i]);
538 524
    }
539 525
    for(i=0;i<nb_input_files;i++) {

Also available in: Unified diff