comparison utils.c @ 11223:a090d10c314f libavcodec

Free encoder extradata in avcodec_close(). Should fix several small memory leaks when encoding (at least for asv, wma and aac). Fix also issue 1577.
author vitor
date Sat, 20 Feb 2010 18:28:11 +0000
parents 31bdf73a0330
children ee2e050815be
comparison
equal deleted inserted replaced
11222:43ecdadf3bc1 11223:a090d10c314f
683 avcodec_thread_free(avctx); 683 avcodec_thread_free(avctx);
684 if (avctx->codec && avctx->codec->close) 684 if (avctx->codec && avctx->codec->close)
685 avctx->codec->close(avctx); 685 avctx->codec->close(avctx);
686 avcodec_default_free_buffers(avctx); 686 avcodec_default_free_buffers(avctx);
687 av_freep(&avctx->priv_data); 687 av_freep(&avctx->priv_data);
688 if(avctx->codec->encode)
689 av_freep(&avctx->extradata);
688 avctx->codec = NULL; 690 avctx->codec = NULL;
689 entangled_thread_counter--; 691 entangled_thread_counter--;
690 692
691 /* Release any user-supplied mutex. */ 693 /* Release any user-supplied mutex. */
692 if (ff_lockmgr_cb) { 694 if (ff_lockmgr_cb) {