comparison h264.c @ 2891:4c6eb826e9cb libavcodec

Just noticed there is a memory leak in h264.c with the usage of rbsp_buffer. Here is a patch which frees the rbsp_buffer in decode_end(). patch by (G«”bor Kov«”cs | picard / demoscene \ hu)
author michael
date Wed, 21 Sep 2005 08:14:17 +0000
parents a95e55679dfa
children a5360f2a673e
comparison
equal deleted inserted replaced
2890:8c9eee3fb35d 2891:4c6eb826e9cb
7805 static int decode_end(AVCodecContext *avctx) 7805 static int decode_end(AVCodecContext *avctx)
7806 { 7806 {
7807 H264Context *h = avctx->priv_data; 7807 H264Context *h = avctx->priv_data;
7808 MpegEncContext *s = &h->s; 7808 MpegEncContext *s = &h->s;
7809 7809
7810 av_freep(&h->rbsp_buffer);
7810 free_tables(h); //FIXME cleanup init stuff perhaps 7811 free_tables(h); //FIXME cleanup init stuff perhaps
7811 MPV_common_end(s); 7812 MPV_common_end(s);
7812 7813
7813 // memset(h, 0, sizeof(H264Context)); 7814 // memset(h, 0, sizeof(H264Context));
7814 7815