Revision 42f97696 libavformat/movenchint.c

View differences:

libavformat/movenchint.c
81 81
        url_close_dyn_buf(track->rtp_ctx->pb, &buf);
82 82
        av_free(buf);
83 83
    }
84
    if (track->rtp_ctx && track->rtp_ctx->streams[0]) {
85
        av_metadata_free(&track->rtp_ctx->streams[0]->metadata);
86
        av_free(track->rtp_ctx->streams[0]->codec->extradata);
87
        av_free(track->rtp_ctx->streams[0]->codec);
88
        av_free(track->rtp_ctx->streams[0]->info);
89
        av_free(track->rtp_ctx->streams[0]);
90
    }
91 84
    if (track->rtp_ctx) {
92
        av_metadata_free(&track->rtp_ctx->metadata);
93
        av_free(track->rtp_ctx->priv_data);
94
        av_freep(&track->rtp_ctx);
85
        avformat_free_context(track->rtp_ctx);
86
        track->rtp_ctx = NULL;
95 87
    }
96 88
    av_freep(&track->enc);
97 89
    /* Set a default timescale, to avoid crashes in dump_format */
......
488 480
        url_close_dyn_buf(rtp_ctx->pb, &ptr);
489 481
        av_free(ptr);
490 482
    }
491
    av_metadata_free(&rtp_ctx->streams[0]->metadata);
492
    av_metadata_free(&rtp_ctx->metadata);
493
    av_free(rtp_ctx->streams[0]->codec->extradata);
494
    av_free(rtp_ctx->streams[0]->codec);
495
    av_free(rtp_ctx->streams[0]->info);
496
    av_free(rtp_ctx->streams[0]);
497
    av_freep(&rtp_ctx);
483
    avformat_free_context(rtp_ctx);
498 484
}
499 485

  

Also available in: Unified diff