Revision b22dbb29 ffmpeg.c

View differences:

ffmpeg.c
505 505

  
506 506
    /* close files */
507 507
    for(i=0;i<nb_output_files;i++) {
508
        /* maybe av_close_output_file ??? */
509 508
        AVFormatContext *s = output_files[i];
510 509
        int j;
511 510
        if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb)
512 511
            url_fclose(s->pb);
513
        for(j=0;j<s->nb_streams;j++) {
514
            av_metadata_free(&s->streams[j]->metadata);
515
            av_free(s->streams[j]->codec);
516
            av_free(s->streams[j]->info);
517
            av_free(s->streams[j]);
518
        }
519
        for(j=0;j<s->nb_programs;j++) {
520
            av_metadata_free(&s->programs[j]->metadata);
521
        }
522
        for(j=0;j<s->nb_chapters;j++) {
523
            av_metadata_free(&s->chapters[j]->metadata);
524
        }
525
        av_metadata_free(&s->metadata);
526
        av_free(s);
512
        avformat_free_context(s);
527 513
        av_free(output_streams_for_file[i]);
528 514
    }
529 515
    for(i=0;i<nb_input_files;i++) {

Also available in: Unified diff