Ticket #2937: ffmpeg-muxer-memory-leak.patch

File ffmpeg-muxer-memory-leak.patch, 673 bytes (added by Jose Santiago, 13 years ago)

Patch to fix the muxer memory leak.

  • libavformat/utils.c

    diff -Naur master-20130903.orig/libavformat/utils.c master-20130903/libavformat/utils.c
    old new  
    32013201    av_dict_free(&st->metadata);
    32023202    av_freep(&st->probe_data.buf);
    32033203    av_freep(&st->index_entries);
    3204     av_freep(&st->codec->extradata);
    3205     av_freep(&st->codec->subtitle_header);
    3206     av_freep(&st->codec);
     3204    if (st->codec) {
     3205        avcodec_close(st->codec);
     3206        av_freep(&st->codec);
     3207    }
    32073208    av_freep(&st->priv_data);
    32083209    if (st->info)
    32093210        av_freep(&st->info->duration_error);