Mercurial > libavcodec.hg
comparison vorbis_enc.c @ 3831:7d27ba61600e libavcodec
Original Commit: r25 | ods15 | 2006-09-22 14:06:04 +0300 (Fri, 22 Sep 2006) | 2 lines
add proper uninit/free to all vorbis encoder context
author | ods15 |
---|---|
date | Mon, 02 Oct 2006 05:56:01 +0000 |
parents | 477ee30c6fc6 |
children | 3d159e4cde5a |
comparison
equal
deleted
inserted
replaced
3830:477ee30c6fc6 | 3831:7d27ba61600e |
---|---|
558 | 558 |
559 | 559 |
560 static int vorbis_encode_close(AVCodecContext * avccontext) | 560 static int vorbis_encode_close(AVCodecContext * avccontext) |
561 { | 561 { |
562 venc_context_t * venc = avccontext->priv_data; | 562 venc_context_t * venc = avccontext->priv_data; |
563 int i; | |
564 | |
565 if (venc->codebooks) for (i = 0; i < venc->ncodebooks; i++) { | |
566 av_freep(&venc->codebooks[i].entries); | |
567 av_freep(&venc->codebooks[i].quantlist); | |
568 av_freep(&venc->codebooks[i].dimentions); | |
569 } | |
570 av_freep(&venc->codebooks); | |
571 | |
572 if (venc->floors) for (i = 0; i < venc->nfloors; i++) { | |
573 int j; | |
574 av_freep(&venc->floors[i].classes); | |
575 if (venc->floors[i].classes) | |
576 for (j = 0; j < venc->floors[i].nclasses; j++) | |
577 av_freep(&venc->floors[i].classes[j].books); | |
578 av_freep(&venc->floors[i].partition_to_class); | |
579 av_freep(&venc->floors[i].list); | |
580 } | |
581 av_freep(&venc->floors); | |
582 | |
583 if (venc->residues) for (i = 0; i < venc->nresidues; i++) { | |
584 av_freep(&venc->residues[i].books); | |
585 } | |
586 av_freep(&venc->residues); | |
587 | |
588 if (venc->mappings) for (i = 0; i < venc->nmappings; i++) { | |
589 av_freep(&venc->mappings[i].mux); | |
590 av_freep(&venc->mappings[i].floor); | |
591 av_freep(&venc->mappings[i].residue); | |
592 } | |
593 av_freep(&venc->mappings); | |
594 | |
595 av_freep(&venc->modes); | |
563 | 596 |
564 av_freep(&avccontext->coded_frame); | 597 av_freep(&avccontext->coded_frame); |
565 av_freep(&avccontext->extradata); | 598 av_freep(&avccontext->extradata); |
566 | 599 |
567 return 0 ; | 600 return 0 ; |